import { isEmpty } from 'radash'; import type { BaseOption } from 'ui/elements/types'; // eslint-disable-next-line @typescript-eslint/no-explicit-any export function normalizeOptions(options: any[] | null | undefined) { if (isEmpty(options)) { return []; } return options?.map(({ label, value }) => ({ label, value, })) as BaseOption[]; }