import { ButtonProps } from "@chakra-ui/react"; /** Action-menu Dropdown (role="menu"): rows fire an action, nothing is "selected" or persisted. For picking a value use `Select`. */ export type DropdownProps = { /** Rendered only for the default dropdownType="button" — has no effect under dropdownType="text" (use `text` there). */ ButtonText?: string; /** Menu rows in order; `id` and `label` are passed to `handleOptionSelect`, and `image` adds a leading icon. */ options: Option[]; /** Fires on click, Enter or Space; the menu closes and focus returns to the trigger. */ handleOptionSelect: (id: string | number, label: string) => void; /** "button" renders a filled primary button; "text" a plain-text trigger. Defaults to "button". */ dropdownType?: "button" | "text"; /** Trigger label for dropdownType="text" only; ignored for "button" (use `ButtonText`). */ text?: string; /** Leading icon inside the trigger, before the label; works with both trigger types. */ DropdownIcon?: JSX.Element; /** Styles the trigger — merged into `sx` for "button", inline `style` for "text". */ dropDownButtonStyle?: React.CSSProperties; /** Shows the rotating chevron on the trigger. Defaults to true. */ isVisibleIconShow?: boolean; /** Spread last onto the "button" trigger, so it can override size/colorScheme; ignored for "text". */ buttonProps?: ButtonProps; /** Inline style on the portaled, fixed-position menu wrapper. */ headStyle?: React.CSSProperties; /** Inline style on the menu list (the bordered, scrolling panel). */ ListStyle?: React.CSSProperties; /** Inline style on every menu row. */ ItemStyle?: React.CSSProperties; /** Inline style on each row's label text. */ LabelStyle?: React.CSSProperties; /** Inline style on each row's `image` icon; ignored for options without one. */ ImageStyle?: React.CSSProperties; /** Trigger on the button scale, menu rows on the option-row scale; defaults to `sm`. `xl` renders an `lg` trigger. */ size?: "xs" | "sm" | "md" | "lg" | "xl"; /** @deprecated Use `size` instead. Kept for backward compatibility. */ optionsSize?: "sm" | "md" | "lg"; /** Draws a separator line between menu rows. */ divider?: boolean; /** Accessible name for the trigger when it renders icon-only (no `ButtonText`/`text`). */ ariaLabel?: string; }; type Option = { id: string | number; label: string; /** Icon component reference (e.g. `Star`), not a rendered element like `` — passed to Chakra's `as`. */ image?: React.ElementType; }; export {};