import { View, Text, StyleSheet, TextInput, NativeSyntheticEvent, TextInputKeyPressEventData, TouchableOpacity } from 'react-native'
import React, { useRef, useState } from 'react'
import { SIZES } from '../../../constants/theme'
import { useTheme } from '../../contexts/ThemeContext'
import { AutoDecimalInput } from '../../../components'

export default function AddItem() {
  const value = useRef<string>("");
  const [formatedValue, setFormatedValue] = useState<string>("");

  const handleValueChange = (formatedValue: string) => {
    setFormatedValue(formatedValue);
  }
  console.log(formatedValue)
  return (
    <View style={styles.container}>
      <AutoDecimalInput onValueChange={handleValueChange} label='Amount'></AutoDecimalInput>
    </View>
  )
}

const styles = StyleSheet.create({
  container: {
    margin: SIZES.normal,
  }
})