/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type SystemStyleObject } from "@chakra-ui/react"; import { type ValueTypeOf } from "@elaraai/east"; import type { RecordSliceBindType } from "@elaraai/east-ui/internal"; import { type Formatters } from "@elaraai/east-ui-components"; import { type LoadingLineValue } from "@elaraai/east-ui-components/internal"; import type { FlowchartWords } from "./messages.js"; import type { FlowchartValue, ModelCounts } from "./model.js"; import { type FlowchartSort } from "./read.js"; type Styles = Record; /** A kind read through its source that writes: what its Save's notice counts the rows it took out of the narrowing in. */ export interface FlowchartNotice { /** The kind. */ readonly sort: FlowchartSort; /** Its source of the slice. */ readonly slice: ValueTypeOf; /** One of its rows, as a sentence names it — `state`. */ readonly singular: string; /** Several. */ readonly plural: string; } /** Props of {@link FlowchartFooter}. */ export interface FlowchartFooterProps { /** The `flowchart` recipe's styles. */ readonly styles: Styles; /** What the flowchart holds, counted: its transitions, and their split. */ readonly counts: ModelCounts; /** The changes waiting on Save; `undefined` where the flowchart edits nothing. */ readonly pending: number | undefined; /** When the records were last saved, as the footer says it — the newest of their last saves; `undefined` with none. */ readonly saved: string | undefined; /** Why a card's ⏎ was refused — `Drop onto a transition`; `undefined`, nothing to say. */ readonly message?: string | undefined; /** The flowchart's words: its numbers print in the app's locale. */ readonly words: FlowchartWords; /** Each kind read through its source that writes: its Save's notice. */ readonly notices: readonly FlowchartNotice[]; /** What the loading line says: a read in flight, or one that failed, with Retry; `undefined` while nothing is read. */ readonly line: LoadingLineValue | undefined; } /** * Renders the footer — see the module docs. * * @param props - The counts, the changes waiting, the last save, a refused ⏎'s reason, the Saves' notices and the * loading line * @returns The footer */ export declare function FlowchartFooter({ styles, counts, pending, saved, message, words, notices, line }: FlowchartFooterProps): import("react/jsx-runtime").JSX.Element; /** A record's last save (R15): when, as the footer and the inspector say it, and who made it. */ export interface FlowchartLastSave { /** The record's kind. */ readonly sort: FlowchartSort; /** The kind's name, as the payload gives it. */ readonly name: string; /** When: its time when it was today, its date and time otherwise. */ readonly when: string; /** When, as an instant: what tells the newest of them. */ readonly at: Date; /** Who made it, where it names a person. */ readonly by: string | undefined; } /** The last saves of the records, each record's, and the newest of them. */ export interface FlowchartLastSaves { /** Each record's last save, in the Flowchart's order of its kinds: one with no commit, or whose read fails, says nothing. */ readonly records: readonly FlowchartLastSave[]; /** The newest of them; `undefined` with none. */ readonly newest: FlowchartLastSave | undefined; } /** * When each of the Flowchart's records was last saved, and who saved it * (R15): its newest commit, read from its kind's `history` where its commits * are read — and again as the record commits — each its time when it was * today, its date and time otherwise, and the person it names. A kind bound * with `Data.bind` or `Data.bindPaged` alone has no history. * * @param value - The payload * @param words - The formatters the time prints with, in the app's locale * @returns Each record's last save, and the newest of them */ export declare function useLastSaves(value: FlowchartValue, words: Formatters): FlowchartLastSaves; export {}; //# sourceMappingURL=footer.d.ts.map