import { type TimeZone } from "./AssetTimezoneContext"; interface UseTimezoneReturn { current: TimeZone; assetTimeZone: TimeZone | null; preferred: TimeZone; setCustomTimezone: (timezone: string | null) => void; /** The resolved custom timezone value (e.g. "America/Denver"). Exposed so host apps can pass it to Iris App iframes via Penpal. */ customTimezone: string | null; } /** * Resolves the active timezone based on user preference, custom override, and optional asset location. * * Returns `current` (browser or custom override), `preferred` (resolved per user settings * and optional asset), and `assetTimeZone` (fetched from the asset's GPS location). * * The asset timezone is resolved by the nearest `AssetTimezoneProvider` in the component tree. * Use `AssetTimezoneProvider` on asset-detail pages to enable machine-timezone resolution. * * **When to use:** * - Use `useTimezone` whenever you need to display or calculate dates in the correct * timezone — especially on asset-detail pages where the machine's timezone may differ * from the user's browser timezone. * - Pair with `useDateAndTime` to format dates in the resolved `preferred` timezone. * - Do **not** rely on `Intl.DateTimeFormat().resolvedOptions().timeZone` directly — * this hook respects the user's preference setting (browser, machine, or custom). */ export declare const useTimezone: () => UseTimezoneReturn; export {};