/** * Locale-aware default unit detection. * * Picks a sensible first-visit unit for a reader who has not made an explicit * choice: Fahrenheit for the handful of countries that use it, Celsius for the * rest of the world. Pure and dependency-free so it can be unit-tested and * reused; {@link browserDefaultUnit} is the thin wrapper that reads the live * browser globals. */ import type { TemperatureUnit } from './units'; /** Countries (ISO 3166-1 alpha-2) whose readers default to Fahrenheit. */ export declare const FAHRENHEIT_REGIONS: ReadonlySet; /** Signals used to infer a default unit (mirrors the browser globals). */ export interface DefaultUnitInput { /** BCP-47 locale tags, most-preferred first (e.g. `navigator.languages`). */ languages?: readonly string[]; /** IANA time zone (e.g. `Intl.DateTimeFormat().resolvedOptions().timeZone`). */ timeZone?: string; /** * Regions (ISO 3166-1 alpha-2) that default to Fahrenheit. Defaults to the * toolkit's {@link FAHRENHEIT_REGIONS}; override to customize the list. */ fahrenheitRegions?: ReadonlySet; } /** * Choose the first-load unit for a reader with no stored preference. * * Uses the first locale that carries a region: Fahrenheit if that country is in * {@link FAHRENHEIT_REGIONS}, otherwise Celsius. When no locale carries a region * (e.g. a bare `en`), falls back to the time zone (US zones → Fahrenheit), then * defaults to Celsius. */ export declare function resolveDefaultUnit(input?: DefaultUnitInput): TemperatureUnit; /** Read the locale/time-zone signals from the browser (SSR-safe). */ export declare function browserDefaultUnit(): TemperatureUnit;