import type { SelectProps } from 'antd';

export type SelectOptionItem = {
  code: string;
  value: string;
};

export type SelectUIProps = Omit<
  SelectProps<string>,
  'options' | 'value' | 'defaultValue' | 'onChange'
> & {
  data: SelectOptionItem[];
  value?: string;
  defaultValue?: string;
  onChange?: (code?: string, item?: SelectOptionItem) => void;
  formatLabel?: (item: SelectOptionItem) => string;
};
