// @flow
import { type TranslatedContent } from '../../../types';
import type { FormFieldError } from '../forms.proptypes';

export type FormInputProps<ValueType> = {|
  id?: string,
  type?: 'date' | 'email' | 'number' | 'text' | 'password', // these types for now
  placeholder?: ValueType,
  value?: ?ValueType,
  disabled?: boolean,
  error?: FormFieldError,
  focusOnMount?: boolean,
  large?: boolean,
  iconType?: 'lock' | 'error' | 'checkmark',
  iconPosition?: 'left' | 'right',
  buttonText?: TranslatedContent,
  onChange: (ValueType, SyntheticInputEvent<HTMLInputElement>) => void,
  onFocus?: (SyntheticFocusEvent<HTMLInputElement>) => void,
  onBlur?: (SyntheticFocusEvent<HTMLInputElement>) => void,
  onRef?: (HTMLInputElement) => void,
  buttonPress?: () => void,
  inputMode?: string,
  hideBorder?: boolean,
  label?: TranslatedContent,
|};
