export type DeliveryWindow = { /** * Hour of day, 0-23. The picker exposes only even 2-hour buckets * (0, 2, … 22) in local time, but the stored UTC value may be any whole * hour once a non-even offset is applied. */ hour: number; /** Day of week, 0 (Sunday) - 6 (Saturday). */ day: number; }; /** Even-hour buckets (0, 2, … 22) shown in the delivery-window picker in local-time mode. */ export declare const STANDARD_DELIVERY_HOUR_BUCKETS: number[]; /** * Compute the device's timezone offset, in whole hours, relative to UTC for a * given IANA timezone. A positive value means the local time is ahead of UTC * (e.g. `Asia/Tokyo` → +9); a negative value means behind (e.g. * `America/New_York` → -4 during EDT). * * Timezones with sub-hour offsets (e.g. `Asia/Kolkata` at +5:30) are rounded * to the nearest whole hour, since the delivery-window picker only supports * whole hours. This means the cron may fire up to ~30 minutes away from the * displayed bucket for those users, which is acceptable for this coarse * 2-hour-window UI. * @param timezone An IANA timezone string, e.g. `America/New_York`. When * undefined (device timezone could not be detected), returns `null` so * callers can fall back to displaying raw UTC values. * @param reference The instant at which to evaluate the offset. Defaults to * now, so daylight-saving transitions are respected. * @returns The whole-hour offset from UTC, or `null` when no timezone is given * or the timezone is invalid. */ export declare function getDeliveryWindowOffsetHours(timezone: string | undefined, reference?: Date): number | null; /** * Convert a stored UTC delivery window to the equivalent local-time window for * display. The hour is snapped down to the nearest lower even bucket so the picker * always has a valid selected option, and the day wraps when crossing midnight. * @param utc The window as stored on the backend (interpreted as UTC). * @param offsetHours The local offset from UTC in whole hours. */ export declare function fromUtcDeliveryWindow(utc: DeliveryWindow, offsetHours: number): DeliveryWindow; /** * Convert a local-time delivery window (as picked in the UI, always an even * bucket) back to the UTC window to persist on the backend. The result is exact * (not snapped) so the delivery time stays accurate even for odd offsets; the * stored UTC hour may therefore be odd. * @param local The window as displayed/picked in local time. * @param offsetHours The local offset from UTC in whole hours. */ export declare function toUtcDeliveryWindow(local: DeliveryWindow, offsetHours: number): DeliveryWindow; /** * Convert a stored UTC window for display in the picker. When the device * timezone is unknown (`offsetHours === null`), returns the raw stored values * without snapping so day-only edits do not change an untouched hour. */ export declare function getDisplayDeliveryWindow(utc: DeliveryWindow, offsetHours: number | null): DeliveryWindow; /** * Apply a partial edit from the picker and return the UTC window to persist. * In UTC-fallback mode, only fields present in `edit` are updated; the rest * are taken unchanged from `storedUtc`. */ export declare function applyDeliveryWindowEdit(storedUtc: DeliveryWindow, edit: Partial, offsetHours: number | null): DeliveryWindow; /** * Hour values to render in the delivery-window `