// @flow
import type { TranslatedContent } from '../../../../types';
import type { FormFieldError } from '../forms.proptypes';
import type { MaskedTextInputOptions } from '../masked-text-input/masked-text-input.proptypes';
import type { FocusEvents } from '../../../../mixins/focus';
import type { TestingProps } from '../../../../mixins/testing';

export type FloatingLabelInputProps<ValueType> = {|
  ...FocusEvents,
  ...TestingProps,
  id?: string,
  type?: 'date' | 'email' | 'number' | 'text' | 'password', // these types for now
  value?: ?ValueType,
  disabled?: boolean,
  error?: FormFieldError,
  focusOnMount?: boolean,
  iconType?: 'lock' | 'error' | 'checkmark',
  iconPosition?: 'left' | 'right',
  buttonText?: TranslatedContent,
  onChange: (SyntheticInputEvent<HTMLInputElement>) => void,
  buttonPress?: () => void,
  onRef?: (HTMLInputElement) => void,
  inputMode?: string,
  hideBorder?: boolean,
  label?: TranslatedContent,
  'aria-describedby'?: string,
  children?: React$Element<React$FragmentType>,
  options?: MaskedTextInputOptions,
  name?: string,

  /* Required for a11y if type="password" */
  hideValueButtonLabel?: TranslatedContent,
  revealValueButtonLabel?: TranslatedContent,
|};
