/** * Feature flags for toolbar buttons. */ interface ToolbarFeatures { measureTools: boolean; selectTool: boolean; explodeTool: boolean; } /** * Options for configuring a Toolbar instance. */ interface ToolbarOptions { getVisibleWidth: () => number; getWidthThreshold: () => number; features: ToolbarFeatures; } /** * Manages a collapsible toolbar with buttons and ellipsis indicators. */ declare class Toolbar { id: string; container: HTMLElement; getVisibleWidth: () => number; getWidthThreshold: () => number; features: ToolbarFeatures; buttons: Record; ellipses: Ellipsis[]; toggles: Record; /** * Create a Toolbar instance. * @param container - The container element for the toolbar. * @param id - Unique identifier for the toolbar. * @param options - Configuration options. */ constructor(container: HTMLElement, id: string, options: ToolbarOptions); private _onMouseLeave; addButton(button: BaseButton, tag: number): void; addSeparator(): void; addEllipsis(ellipsis: Ellipsis): void; defineGroup(buttons: ClickButton[]): void; private _toggle; minimize: (id?: number | null) => void; maximize: (id?: number | null) => void; dispose(): void; } declare class Ellipsis { id: number; action: (id: number) => void; html: HTMLSpanElement; constructor(id: number, action: (id: number) => void); private _onMouseEnter; dispose(): void; } declare class BaseButton { name: string; html: HTMLSpanElement; frame: HTMLSpanElement; containerId: string; constructor(_theme: string, icon: string, tooltip: string); private _onClick; dispose(): void; setId(id: string): void; handler: (_e: Event) => void; alignRight(): void; show(flag: boolean): void; } declare class Button extends BaseButton { action: (name: string, shift: boolean) => void; constructor(theme: string, svg: string, tooltip: string, action: (name: string, shift: boolean) => void); handler: (e: Event) => void; highlight: (flag: boolean) => void; } declare class ClickButton extends BaseButton { action: (name: string, state: boolean) => void; state: boolean; dropdown: string[] | null; sameGroup: ClickButton[]; checkElems: Record; constructor(theme: string, svg: string, tooltip: string, action: (name: string, state: boolean) => void, defaultState?: boolean, dropdown?: string[] | null); get: () => boolean; set: (state: boolean) => void; clearGroup: () => void; extractIdFromName: (name: string) => string; handler: (e: Event) => void; addGroupMember(button: ClickButton): void; } export { Toolbar, Button, ClickButton, Ellipsis };