import { Thumbnails } from './thumbnails'; import { Outline } from './outline'; import { Search } from './search'; /** The side panels, all of which share the one rail beside the book. */ declare const PANELS: { thumbnails: typeof Thumbnails; outline: typeof Outline; search: typeof Search; }; type PanelKind = keyof typeof PANELS; import type { ControlsOptions } from './types'; import type { Zine } from '../zine'; export declare class Toolbar { #private; constructor(zine: Zine, container: HTMLElement, options: ControlsOptions, hidden?: ReadonlySet); /** Build the layout. Separate from construction so instance-bound widgets (the page field, the * search panel) can be registered against this toolbar first. */ mount(options: ControlsOptions): void; destroy(): void; /** Registered lazily by {@link registerWidgets} so the widget can reach this instance. */ makePageInput(): HTMLElement; /** Which side panel is showing, if any. */ openPanel(): PanelKind | null; /** * Whether this document has a table of contents worth offering. * * Many PDFs have none, and a control that can only report its own emptiness is a dead end, so * the outline button stays hidden until the outline is known to be non-empty. The first call * kicks off the lookup and refreshes the toolbar when it lands; `Zine.getOutline` memoizes, so * the panel does not pay for it twice. */ hasOutline(): boolean; /** * Show one of the side panels, or close it if it is already up. They share the rail beside the * book, so opening one closes the others. Rebuilt each time, so the thumbnail rail always * matches the current spread grouping (which `spreadMode` and the responsive fallback change). */ togglePanel(kind: PanelKind): void; } /** * Controls that need the toolbar itself (a DOM widget, or a panel to open) are registered per * instance, since the registry is module-level and shared. */ export declare function registerWidgets(toolbar: Toolbar): void; export {};