/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type ReactElement } from "react"; import type { SortedMap } from "@elaraai/east"; import { type EditIssue, type EditingWords, type HistoryAction, type KeySearchSource, type ToolbarItem } from "@elaraai/east-ui-components"; import type { RosterCommands } from "./actions.js"; import type { RosterEditing } from "./editing.js"; import { type Issue, type RosterStyles, type RosterValue, type Status } from "./model.js"; import type { RosterWindow } from "./window.js"; interface ToolbarArgs extends RosterWindow { value: RosterValue; styles: RosterStyles; commands: RosterCommands; editing: RosterEditing | undefined; words: EditingWords; /** Whether main is narrower than a phone: People offers Week alone (#1406, P31). */ narrow: boolean; /** The selected person-week's week, which Month → Week opens (#1406, P3). */ selectedWeek: Date | undefined; /** The status chip's words — the week's, or by the day the day in view's or its week's days' (#1550); `undefined` without periods. */ status: string | undefined; /** What Publish publishes, in its words (#1550): the week, or by the day in Shifts' Day the day in view. */ publishUnit: "day" | "week"; /** * Whether the week is not read yet (#1398, CL1): its status, its issues and Publish keep their slots, the status a * placeholder — never "Not started" before its row is read — and the issues one too, each unseen at its footprint * until the frame's reveal says so. */ unread: boolean; /** Whether Publish is under way. */ publishing: boolean; /** The open picker's periods' statuses, by their start: its weeks', or by the day its days' (#1550). */ picker: SortedMap; onDisplay: (value: Partial<{ density: "compact" | "comfortable"; chipSkills: boolean; requirements: boolean; }>) => void; issues: readonly Issue[]; onIssues: () => void; onAction: (action: HistoryAction) => void; onPickerDates: (dates: readonly Date[]) => void; /** How many refusals hold Save (#1525): the issues chip counts them with the breaches and the gaps. */ refused: number; /** The history's warning button pressed: its first issue's duty shown and selected (#1525). */ onIssue: (issue: EditIssue) => void; /** Where an issue of the history's is, in the Roster's words — its banners' — what the history item's conflicts name their items by. */ where?: ((issue: EditIssue) => string) | undefined; /** A conflict's Go to: its item shown and selected. */ onConflict?: ((issue: EditIssue) => void) | undefined; /** Search Records over the people's keys (#1398); `undefined` with no one to seek. */ search?: KeySearchSource | undefined; /** The Elara eye (#1409): the run's toolbar item, listed between the issues item and the history item; `undefined` with no optimiser. */ optimise?: ToolbarItem | undefined; /** * The eye's entry (ruled 27 Oct 2026, "Into the View menu"): what the View lists in the eye's place, beside the issues, * where the row's floor folds the eye into it; `undefined` with no eye. */ optimiseEntry?: ReactElement | undefined; /** Whether a run of the optimiser is out (#1409, R2): the history item stays, its actions locked. */ locked?: boolean | undefined; /** Whether the issues chip flashes (#1409): a run's result landed, and its highlight is on. */ issuesFlash?: boolean | undefined; } /** One shared Toolbar, including the narrowing's rail and the shared editing history. */ export declare function useRosterToolbar(args: ToolbarArgs): ReadonlyArray; export {}; //# sourceMappingURL=toolbar.d.ts.map