import React, { forwardRef } from 'react'
import { TextInput as RNTextInput, type TextInputProps as RNTextInputProps } from 'react-native'

interface InputProps extends RNTextInputProps {
  className?: string
  style?: any
}

const Input = forwardRef<RNTextInput, InputProps>((props, ref) => {
  const { className = '', style, ...reset } = props

  const inputProps = {
    className,
    style,
    ref,
    ...reset,
  }

  return <RNTextInput {...inputProps} />
})

Input.displayName = 'Input'
export default Input
