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

import type { CustomStyles } from 'features/Common'

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

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

}
