import { type DeadlineThresholds } from "./deadline"; import { type DateSlot, type ShapeBaseProps, type ShapeFigures, type ShapeGroup, type ShapeGroupOption, type TextSlot } from "./shape_frame"; /** ONE OBLIGATION a row carries — a date it is owed by, and the stamp that * closes it. Both halves, because DONE-NESS IS NOT READABLE FROM A DATE. */ export interface Obligation { /** The obligation field's own label — WHAT is owed. */ label: string; /** When it falls due; unset, the obligation does not exist yet. */ due: (row: T) => string | null | undefined; /** True once the closing stamp is filled — a date recorded, a file filed. */ satisfied: (row: T) => boolean; } /** ONE OPEN OBLIGATION — a row of this desk, fanned out of the record that owes * it. It is DERIVED and has no row of its own, which is why the door opens the * record it belongs to and every act on it is that record's. */ export interface OpenObligation { /** Stable across renders: the parent's key and the obligation's place in the * declared list, which is what makes a drawer's ◀ ▶ hold their position. */ key: string; /** The record that owes it — what the door opens. */ row: T; label: string; due: string; /** Calendar days until that date — NEGATIVE once it has passed. */ days: number; /** The whole runway this obligation was given, in days — `null` where the * screen bound no `runway`, or where the record has no date in it. */ window: number | null; spent: number; } /** * THE OBLIGATION DESK — one row per thing that is OWED, not per record that owes * it: a document cut-off, a permit renewal, a payment due, an inspection. *"What * runs out first, and what happens if it does?"* * * WHAT IS IN IT is decided by the data: an obligation with no date is not one * yet, and one whose stamp is filled is done. The door is the PARENT's record. * The four columns are named by the KIT, since the rows are fanned out of * several fields at once. */ export interface ObligationDeskProps extends Omit, "selection"> { /** The `identity` role on the record that owes — drawn as the CAPTION under * what is owed, because the subject of a row here is the obligation. */ identity: TextSlot; /** The obligation fields, in the model's order — every one the record carries, * open or closed. The desk keeps the open ones. */ obligations: readonly Obligation[]; /** The `when` the runway is measured FROM. "Three days left" says nothing * about pressure on its own; unbound, the desk draws no meter. */ runway?: DateSlot; /** Where "act now" and "act soon" start. The kit's freight defaults (1 / 3) * stand unless the trade's consequences arrive slower. */ thresholds?: DeadlineThresholds; /** The clock every countdown is read against; the real one by default. */ now?: Date; /** Figures over the register — over the OBLIGATIONS in view rather than the * records, because that is what the rows are. */ above?: ShapeFigures>; /** Draw the desk as RUNS — over the OBLIGATIONS in view, so a run is not keyed * off a record whose four deadlines are four rows. */ group?: ShapeGroup>; /** The groupings the band offers — `ShapeFrame.groups`, over the obligations. */ groups?: readonly ShapeGroupOption>[]; } export declare function ObligationDesk(props: ObligationDeskProps): import("react").JSX.Element;