/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { SortedMap, type ValueTypeOf } from "@elaraai/east"; import { type RecordSliceBindType, type RecordSliceChoiceType, type RecordSliceWhereType } from "@elaraai/east-ui/internal"; /** One record Slice's controls. */ type Bind = ValueTypeOf; /** An event kind narrowed through its source of the slice: the kind — its key, whether it has a backlog and its start field — and its part. */ export interface BacklogPart { /** The event kind. */ readonly kind: { readonly key: string; readonly backlog: boolean; readonly schedule: { readonly start: string; }; }; /** Its source's part of the slice. */ readonly part: Bind; } /** What the rail hides of the backlog. */ export interface BacklogNarrowing

{ /** The backlog kinds whose source's choices — its window aside, which the backlog never reads — narrow their backlog. */ readonly narrowing: readonly P[]; /** The stored unscheduled events those choices hide; `undefined` while a count is read, or none narrows. */ readonly hidden: number | undefined; /** Whether a count of what those choices hide is being read: `hidden` is `undefined` meanwhile. */ readonly counting: boolean; /** Clears those choices, each source keeping its window; `undefined` while none narrows. */ readonly clear: (() => void) | undefined; } /** * A source's choices but its start's, its start Unset: what lists its backlog. * * @param where - The source's narrowing * @param start - The kind's start field * @returns The narrowing its backlog is read under */ export declare function backlogWhere(where: ValueTypeOf, start: string): SortedMap>; /** * A kind's start Unset among the rows its page holds (#1621, `recordSliceBase`): every unscheduled event its source * holds, whatever the viewer's choices — on a page with no scope, every one its record holds. * * @param part - The kind's source's part of the slice * @param start - The kind's start field * @returns The narrowing */ export declare function backlogWhole(part: Pick, start: string): SortedMap>; /** * Whether the viewer's choices narrow a kind's backlog: a choice of theirs in force (`recordSliceChoices`) but its * window, which a backlog event has none of. Its page's scope is none (#1621): the viewer neither made it nor can * clear it. * * @param part - The kind's source's part of the slice * @param start - The kind's start field * @returns Whether a choice of the viewer's narrows the backlog */ export declare function backlogNarrowed(part: Pick, start: string): boolean; /** * What the rail hides of the backlog (see the module docs). * * @param eventParts - Each event kind narrowed through its source * @returns The narrowing kinds, what they hide and how they clear */ export declare function useBacklogNarrowing

(eventParts: readonly P[]): BacklogNarrowing

; export {}; //# sourceMappingURL=backlog.d.ts.map