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: Omit<
    SingleSelectProps<V, T>,
    'TextInputComponent' | 'groupStyleEnabled'
  >
) => React.ReactElement;

type MultiSelectType = <V, T extends SelectOptionType<V> = SelectOptionType<V>>(
  props: Omit<
    MultiSelectProps<V, T>,
    'TextInputComponent' | 'groupStyleEnabled'
  >
) => React.ReactElement;

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