import type { ReactNode } from "react"; import type { ControlSize } from "../../Theme/tokens/primitives/controlSizes"; /** SelectV2 option shape; adds optional `icon`/`description`/`isDisabled` beyond the plain id/label pair. */ export type OptionProp = { /** Unique value of the option; what `value` selects by. */ id: string | number; /** Text shown in the row and the trigger; the search filter matches against it. */ label: string | number; /** Optional leading icon/avatar for this option's row (and the trigger, when selected). */ icon?: ReactNode; /** Optional secondary line under the label (e.g. an email under a name); not matched by the search filter. */ description?: string; /** Row is shown dimmed and clicks/Enter on it are ignored. */ isDisabled?: boolean; }; /** sm/md/lg subset kept for existing importers; the `size` prop takes the full `ControlSize` scale. */ export type SelectV2Size = "sm" | "md" | "lg"; type SelectV2CommonProps = { /** Choices in display order. */ options: OptionProp[]; /** DOM id of the trigger; the label's `for` and the message ids derive from it. Auto-generated when omitted. */ id?: string; /** Submits the selection with a surrounding `