/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { ToolbarItem } from "@elaraai/east-ui-components"; import { type SlotStyles } from "@elaraai/east-ui-components/internal"; import type { SheetToolbarParts } from "../sheet/Toolbar.js"; import type { RecordNoun } from "./status.js"; /** Props of {@link useRecordToolbarItems}. */ export interface RecordToolbarProps { /** The record recipe's slot styles. */ styles: SlotStyles; /** The Sheet's toolbar items, as parts: the rail, the Elara eye and the history are the Record's. */ parts: SheetToolbarParts; /** The title; `undefined` for a Record with none, which leads its row with the rail. */ title: string | undefined; /** The record's rows, counted in the viewer's language; `undefined` while not known. */ count: string | undefined; /** The status line's words. */ status: string; /** The Record's word for its rows. */ noun: RecordNoun; /** Add, where the Record adds rows; `undefined` hides it. */ onAdd: (() => void) | undefined; /** Delete of the ticked rows, where the Record deletes rows; `undefined` hides it. */ onDelete: (() => void) | undefined; /** How many of the rows shown are ticked: Delete is off at none. */ ticked: number; /** That count in the viewer's language: what Delete's tooltip says. */ tickedCount: string; /** * Whether a gesture may be made now: Add and Delete are off while the session takes none — an Apply out — and while * the rows take none, a narrowing standing in or a far jump held. */ writable: boolean; } /** * Builds the Record's toolbar items in the row's order — see the module docs. * * @param props - What the items show and drive * @returns The items, a falsy entry for each the Record has no use for */ export declare function useRecordToolbarItems(props: RecordToolbarProps): ReadonlyArray; //# sourceMappingURL=toolbar.d.ts.map