import type { SelectOption } from './types';
import { BaseSelect } from './BaseSelect';

export type SingleSelectProps<TValue = string> = {
  options: SelectOption<TValue>[];
  value?: TValue | null;
  defaultValue?: TValue | null;
  onChange?: (value: TValue | null) => void;
} & Omit<import('./BaseSelect').BaseSelectProps<TValue>, 'isMulti' | 'values' | 'defaultValues' | 'onChangeMulti' | 'options'>;

export function SingleSelect<TValue = string>(props: SingleSelectProps<TValue>) {
  return <BaseSelect<TValue> {...props} isMulti={false} closeMenuOnSelect />;
}

