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; /** Pins the item to a group at the bottom edge of the sidebar. The group stays visible while the other items scroll, and it isn't rendered when no item is pinned. Use it for up to 3 items. Pinned items ignore `sectionTitle`. * @default false */ pinToBottom?: boolean; /** 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, each a button with a label, 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 * - `pinToBottom`: pins the item to a group at the bottom edge of the sidebar. */ 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