import { ay as MenuItem } from './index-D7ZH0AzE.cjs'; /** * order3000 lunch-menu availability — the per-item rotation logic, provided by * the SDK so every consumer (e.g. thamarai's `/mittagsmenü` page) filters a menu * identically without re-implementing the null / `[]` / `[values]` semantics. * * Each menu item carries two orthogonal, optional rotation dimensions: * - `availableWeeks` — ISO calendar weeks (KW 1–53) * - `availableDays` — weekdays * For each: `null` = no restriction (always), `[]` = never served, `[values]` = * only those. An item shows on a given weekday of a given calendar week only * when BOTH dimensions pass. * * Pure and dependency-free (no dates, no `window`) — safe to import in SSR or * the browser. Calendar math (which ISO week "today" is, the dates of a week) * is the caller's job via `@kolaveri/utils` / `date-fns`. */ /** A weekday value as carried by a menu item's `availableDays`. */ type MenuWeekday = NonNullable[number]; /** Mon→Sun — the canonical order lunch-menu weekday groups are emitted in. */ declare const MENU_WEEKDAY_ORDER: readonly MenuWeekday[]; /** * Whether an item is on the rotation for the given ISO calendar week. * `null` weeks = every week; `[]` = never; otherwise only the listed weeks. */ declare const isMenuItemAvailableInWeek: (item: Pick, isoWeek: number) => boolean; /** * Whether an item is on the rotation for the given weekday. * `null` days = every weekday; `[]` = never; otherwise only the listed days. */ declare const isMenuItemAvailableOnWeekday: (item: Pick, weekday: MenuWeekday) => boolean; /** One weekday's lunch offering within a calendar week. */ interface LunchMenuWeekdayGroup { weekday: MenuWeekday; items: MenuItem[]; } /** * Group a menu's items by weekday for one ISO calendar week — the data model * behind a calendar-week lunch-menu page. * * Keeps only active items available in `isoWeek`, buckets them into the weekday * groups they're available on (Mon→Sun), and DROPS weekdays with no items. * Item order within each group is preserved from the input (order3000 returns * `menu.items` pre-sorted by `sortIndex`), so callers should pass them as-is. */ declare const groupLunchMenuByWeek: (items: MenuItem[], isoWeek: number) => LunchMenuWeekdayGroup[]; export { MENU_WEEKDAY_ORDER, groupLunchMenuByWeek, isMenuItemAvailableInWeek, isMenuItemAvailableOnWeekday }; export type { LunchMenuWeekdayGroup, MenuWeekday };