/** * Single source of truth for parsing and matching blackout dates across the * datepicker. Both `auro-calendar` (memoized Set + `isDateBlackout`) and the * pre-`firstUpdated` fallback inside `auro-calendar-cell` route through these * helpers so the YYYY-MM-DD → seconds conversion and the merge-with-legacy * `disabledDays` rules are defined exactly once. */ /** * Converts a `YYYY-MM-DD` ISO date string to a Unix timestamp (seconds) * representing local midnight on that calendar day. Returns `null` for * inputs that don't parse to a finite timestamp. * * Uses the `new Date(year, monthIndex, day)` constructor (NOT * `new Date(isoStr)`) so the result is local-midnight rather than UTC * midnight — required to keep the calendar grid aligned with the user's * local calendar day in negative-offset timezones. * * @param {string} isoStr - Date string in `YYYY-MM-DD` format. * @returns {number|null} Local-midnight Unix timestamp (seconds), or null. */ export function parseIsoToTimestamp(isoStr: string): number | null; /** * Builds a `Set` of seconds-since-epoch timestamps covering both the * legacy `disabledDays` (already-numeric) array and the ISO `blackoutDates` * array. Use this for O(1) membership checks in hot paths. * * @param {Array|undefined} disabledDays - Legacy timestamp array. * @param {Array|undefined} blackoutDates - ISO `YYYY-MM-DD` array. * @returns {Set} */ export function buildBlackoutSet(disabledDays: Array | undefined, blackoutDates: Array | undefined): Set; /** * One-shot membership test for a single timestamp against both blackout * sources. Allocates a Set on each call; only use this in cold paths * (e.g. the pre-`firstUpdated` cell fallback). Hot paths should hold the * Set returned from `buildBlackoutSet` and `.has(ts)` directly. * * @param {number} dateTs - Unix timestamp (seconds) to test. * @param {Array|undefined} disabledDays - Legacy timestamp array. * @param {Array|undefined} blackoutDates - ISO `YYYY-MM-DD` array. * @returns {boolean} */ export function isBlackoutTimestamp(dateTs: number, disabledDays: Array | undefined, blackoutDates: Array | undefined): boolean;