import MultiSelect from './MultiSelect';
import SingleSelect from './SingleSelect';
import type { MultiSelectProps } from './MultiSelect';
import type { SingleSelectProps } from './SingleSelect';
import type { SelectOptionType } from './types';

export type { MultiSelectProps, SingleSelectProps };

type SingleSelectType = <
  V,
  T extends SelectOptionType<V> = SelectOptionType<V>
>(
  props: SingleSelectProps<V, T>
) => React.ReactElement;

type MultiSelectType = <V, T extends SelectOptionType<V> = SelectOptionType<V>>(
  props: MultiSelectProps<V, T>
) => React.ReactElement;

export default Object.assign(SingleSelect as SingleSelectType, {
  Multi: MultiSelect as MultiSelectType,
});
