import type {
  InputHTMLAttributes,
  ChangeEvent,
} from 'react'

import type { CustomStyles } from 'features/Common'

export type Option = {
  id: number | string,
  name: string,
}

export type Props<T> = Pick<InputHTMLAttributes<HTMLInputElement>, (
  | 'disabled'
  | 'title'
  | 'placeholder'
  | 'onBlur'
)> & {
  className?: string,
  customListStyles?: CustomStyles,
  error?: string | null,
  label?: string,
  labelLexic?: string,
  labelWidth?: number,
  maxLength?: number,
  noSearch?: boolean,
  onChange?: (event: ChangeEvent<HTMLInputElement>) => void,
  onSelect?: (option: T | null) => void,
  options: Array<T>,
  selected?: boolean,
  value: string,
  withError?: boolean,
}
