import type { Moteur, Resultat } from './contrat.js'; import { type TableCoefficients } from './coefficients.js'; export interface LigneClimat { dept: string; nom_dept?: string; zone_rt: string; pluvio_mm_an?: number | null; dju_base_18?: number | null; zone_biogeo?: number | null; [autre: string]: unknown; } export type ClasseRt = 'H1' | 'H2' | 'H3'; export type ZoneBiogeo = 'C' | 'M' | 'OC' | 'MED'; export interface Contexte { /** Département tel que trouvé (« 2A », « 971 », « 75 ») ou null si inconnu. */ departement: string | null; zone_climatique_rt: string; zone_rt_class: ClasseRt; /** Zone écologique (biogéographique) en lettres : C, M, OC, MED. */ zone_biogeo: ZoneBiogeo; /** Zone biogéographique numérique (1 à 8) telle que portée par france_climat. */ zone_biogeo_code: number; pluviometrie_mm: number; dju: number; } export interface EntreesContexte { code_postal: string; } export interface DonneesContexte { france_climat: LigneClimat[]; coefficients?: TableCoefficients; } /** Zone biogéographique numérique → libellé (V2 calibrage.js, inchangé). */ export declare const ZONE_BIOGEO_MAP: Record; /** Sous-zone RT (H1a, H2d…) → classe principale. */ export declare function zoneRtToClass(zone_rt: string | null | undefined): ClasseRt; /** * Département depuis un code postal : DOM (97x → trois caractères), Corse * (20000-20190 → 2A, 20200-20620 → 2B, autre 20xxx → 2A), sinon deux chiffres. * Reprend `deptFromCp` de calculs (scripts/autonomie/data.js), seule version * qui gérait ces cas. Renvoie null si le code postal est inexploitable. */ export declare function departementDepuisCodePostal(code_postal: string | number | null | undefined): string | null; /** * Dérive le contexte climatique. Fonction pure, utilisée par le moteur * `commun.contexte` et par le noyau autonomie (`selectionner`). */ export declare function deriveContexte(code_postal: string | number | null | undefined, climat: LigneClimat[], coefficients?: TableCoefficients): Resultat; export declare const contexte: Moteur;