export interface Option { label: string; value: string; } export type NestedOptions = { options: { label: string; options: Option[]; }[]; label: string; }[]; /** Flat list or nested hierarchy. */ export type MultiSelectOptions = Option[] | NestedOptions; export interface MultiSelectWithSearchProps { /** Flat list or nested hierarchy. Pass an empty array for flat mode with no selectable items. */ options: MultiSelectOptions; onChangeOptions: (options: Option[]) => void; selectedOptions?: Option[]; placeholder?: string | null; isLoading?: boolean; searchBy?: string[]; disabled?: boolean; }