/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type RosterLayout, type RosterPeriod, type RosterSpan, type RosterValue, type RosterView } from "./model.js"; export interface RosterWindow { view: RosterView; setView: (next: RosterView) => void; /** The layouts this Roster offers, in the switch's order: the `views` prop's. */ layouts: readonly RosterLayout[]; /** Whether the layout in view offers Day, and Week (`viewPeriods`): what a heading opening one of them is a control only for. */ opensDay: boolean; opensWeek: boolean; /** The span in view: its weeks, and the window its reads cover. */ span: RosterSpan; /** The span's first week's first day. */ start: Date; /** The day of its week the view's date is, from zero: the day the Shifts layout's Day period shows. */ day: number; /** Shows a layout, with the period it last had (P1). */ setLayout: (layout: RosterLayout) => void; /** * Shows a period of the layout in view (P3): Week → Month opens the month holding the week's fourth day; Month → Week * the week given, else the week Month was opened from while the month in view still holds it, else the month's first * whose fourth day falls in it. */ setPeriod: (period: RosterPeriod, week?: Date) => void; /** Steps the span by its unit — a week, or a month in Month (P2). */ step: (by: number) => void; /** Opens a week in the Week period, of the layout given or the one in view (P12, P24). */ openWeek: (week: Date, layout?: RosterLayout) => void; } /** * The week is the Roster's own: its navigation and its picker choose it, kept per viewer (#1342: no Slice picks it), the * page's own while the page runs (see the module docs). * * @param value - The payload: the author's view, and the week's start * @param key - The Roster's storage key * @param narrow - Whether main is narrower than a phone: People shows a week at a time there, whatever is kept or offered (P31), so every week can be reached * @returns The view, what moves it, the span in view, its first day and the view's day in its week */ export declare function useRosterWindow(value: RosterValue, key: string, narrow: boolean): RosterWindow; //# sourceMappingURL=window.d.ts.map