/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { ValueTypeOf } from "@elaraai/east"; import type { RecordSliceBindType, RecordSlicesChromeType } from "@elaraai/east-ui/internal"; import { type CalendarKind, type CalendarRange, type CalendarValue, type CalendarView } from "./model.js"; /** One record Slice's controls. */ type Bind = ValueTypeOf; /** An event kind narrowed through its source of the slice: the kind, and its part. */ export interface CalendarEventPart { /** The event kind. */ readonly kind: CalendarKind; /** Its source's part of the slice: the Slice its reads, its counts and its Save notice go through. */ readonly part: Bind; } /** The window and the slice that every Calendar layout consumes. */ export interface CalendarWindow { view: CalendarView; setView: (next: CalendarView) => void; range: CalendarRange; /** The layouts this Calendar offers, in the switch's order: the `views` prop's. */ layouts: readonly CalendarView["layout"][]; /** The periods this Calendar offers, in the switch's order: the `viewPeriods` prop's. */ periods: readonly CalendarView["period"][]; /** The rail; `undefined` with no slice. */ chrome: ValueTypeOf | undefined; /** Each event kind narrowed through its source, in the kinds' order. */ eventParts: readonly CalendarEventPart[]; /** The event sources that hold the window: each with a range, in the kinds' order. */ windowParts: readonly CalendarEventPart[]; /** The rail's affordances. */ affordances: readonly string[]; /** Why the window could not be written to a source's range — its indexes answer none alone. */ error: string | undefined; } /** * Each event kind narrowed through its source of the slice: the source named * after its slot, as the tag hands it the kind (#1343). * * @param value - The payload * @returns Each such kind and its part, in the kinds' order */ export declare function calendarEventParts(value: CalendarValue): CalendarEventPart[]; /** The slice is the window's owner when it narrows an event kind; layout and period remain viewer preferences. */ export declare function useCalendarWindow(value: CalendarValue, key: string, now: Date): CalendarWindow; export {}; //# sourceMappingURL=window.d.ts.map