import * as React from 'react'; import type { ToggleButtonProps } from '../ToggleButton'; export type ComposerSidebarItemClickHandler = (event: React.MouseEvent, item: { id: string | number; label: string; }) => void; export type ComposerSidebarItem = { id: string | number; label: string; disabled?: boolean; icon?: any; sectionTitle?: string; /** Defines a click handler for this item, called with the click event and the item's `id` and `label`. Overrides the sidebar's `onClick`. */ onClick?: ComposerSidebarItemClickHandler; }; export type ComposerSidebarProps = { /** Applies a data-hook HTML attribute to be used in the tests. */ dataHook?: string; /** Controls the items' label placement. * @default 'end' */ labelPlacement?: ToggleButtonProps['labelPlacement']; /** Controls the items' label tooltip when labelPlacement is set to tooltip. */ labelTooltipProps?: ToggleButtonProps['tooltipProps']; /** Sets the size of the items. * @default 'medium' */ size?: string; /** Sets the width of the container. */ width?: number | string; /** Specifies a CSS class name to be appended to the component's root element. * @internal */ className?: string; /** Defines which item is currently selected. * @default null */ selectedId?: number | string; /** Defines an array of items (buttons and labels) to show on the sidebar: * - `label`: text string next to a button * - `icon`: icon shown in the toggle button * - `disabled`: disables the item * - `onClick`: defines what happens when the item is clicked on * - `sectionTitle`: defines a section under which each item is placed */ items?: ComposerSidebarItem[]; /** Defines a default click handler for items, called with the click event and the clicked item's `id` and `label`. */ onClick?: ComposerSidebarItemClickHandler; /** Controls the ellipsis of the item label. * @default true */ ellipsis?: boolean; /** Applies additional props to every item's ``, such as `skin` or `shape`. Sidebar props (`size`, `labelPlacement`, `labelTooltipProps`) and item state take precedence. * @linkTypeTo ToggleButton * @setTypeName ToggleButtonProps */ toggleButtonProps?: ToggleButtonProps; }; //# sourceMappingURL=ComposerSidebar.types.d.ts.map