import { makeListForSelect } from './makeListForSelect';

export const makeListForSelectWithNull = <
  T extends { id: number | string; name?: string },
>(
  list: Array<T>,
): Array<{ value: string | undefined; label: string }> => [
  { value: undefined, label: '----' },
  ...makeListForSelect(list),
];
