/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * One folding Toolbar: the rail, Calendar navigation, overlaps, Search Records and shared history. The count counts the * events drawn, and names the kinds past the cap it counts none of (#1424): `13 events, print jobs not counted`, never a * count that leaves them out unsaid. */ import { type ValueTypeOf, type option } from "@elaraai/east"; import type { RecordSlicesChromeType } from "@elaraai/east-ui/internal"; import { type HistoryAction, type KeySearchSource, type ToolbarItem } from "@elaraai/east-ui-components"; import type { ScheduleOverlaps } from "../shared/schedule/overlaps.js"; import type { CalendarCommands } from "./actions.js"; import type { CalendarWords } from "./messages.js"; import type { CalendarEventPart } from "./window.js"; import { type CalendarItem, type CalendarRef, type CalendarStyles, type CalendarUncounted, type CalendarView } from "./model.js"; interface ToolbarArgs { view: CalendarView; setView: (view: CalendarView) => void; now: Date; /** What this Calendar calls its Resources layout (#1516). */ resourcesWord: string; /** The layouts this Calendar offers, in the switch's order: the `views` prop's. */ layouts: readonly CalendarView["layout"][]; /** The periods this Calendar offers, in the switch's order: the `viewPeriods` prop's. */ periods: readonly CalendarView["period"][]; /** The window's events; `undefined` while its period is read: "…", never a count of another period's (#1398, CL13). */ count: number | undefined; /** The kinds past the cap (#1424): the count counts none of their events, and says so. */ uncounted: CalendarUncounted; styles: CalendarStyles; commands: CalendarCommands | undefined; /** The Calendar's words: its message table — the history's, and what Search Records searches — and the app's formatters. */ words: CalendarWords; overlaps: ScheduleOverlaps; select: (refs: CalendarRef[]) => void; /** Whether an overlap shows among what is drawn. */ overlapsShown: boolean; onAction: (action: HistoryAction) => void; paged: boolean; /** The rail; `undefined` with no slice. */ chrome: ValueTypeOf | undefined; /** The rail's affordances. */ affordances: readonly string[]; /** What the rail counts each source in, and heads it with folded, where the source has no label of its own. */ nouns: Readonly>; /** The event sources that hold the window: their ranges are the navigation's, never chips of the rail's. */ windowParts: readonly CalendarEventPart[]; sunday: boolean; navigationDate: number; rangeLabel: string | undefined; onNavigate: (date: number) => void; /** Told when the date picker's Today is pressed: the time grid and the timeline bring the now line into view (#1398). */ onToday?: (() => void) | undefined; /** Search Records over the event kinds' keys (#1398); `undefined` with no kind to seek. */ search?: KeySearchSource | undefined; /** The Elara eye (#1409): the run's toolbar item, listed immediately before the history item; `undefined` with no optimiser. */ optimise?: ToolbarItem | undefined; /** Whether a run of the optimiser is out (#1409, R2): the history item's actions locked. */ locked?: boolean | undefined; /** * The events drawn whose stored rows break their kind's bounds (#1585): each a warning beside the history's issues, * holding no Save — its event, the field, by its form's key, and its words, `Mounting plates · Hours: at least 1`. */ warnings?: readonly { readonly kind: string; readonly key: string; readonly field: string; readonly text: string; }[] | undefined; /** * Asks an event's form for the field an issue or a warning gone to names, which takes the keyboard as the form draws * it (`../shared/schedule/field-ask.tsx`); one naming no field asks for none. */ askField?: ((kind: string, entry: string, field: option) => void) | undefined; } /** The control row uses shared folding ranks, popovers and coarse-pointer targets. */ export declare function useCalendarToolbar(args: ToolbarArgs): ReadonlyArray; export {}; //# sourceMappingURL=toolbar.d.ts.map