{
  "$schema": "./mapping_schema.json",
  "brand": "Bosch",
  "aliases": [
    "Bosch Home Comfort",
    "elm.leblanc",
    "Bosch Thermotechnologie"
  ],
  "source_files": [
    "FAB-DIS_3.00_ALL_20260728_V3_2026.json",
    "FAB-DIS_3.00_ALL_20260728_V3_2026_conforme.xlsx"
  ],

  "filters": {
    "include_families": [
      "F09", "F10", "F12", "F13", "F16", "F17", "F19", "F20", "F21"
    ],
    "exclude_keywords": [
      "fioul", "gaz", "brosse", "râpe", "ramonage", "nettoyage", "disconnecteur",
      "chaudière murale", "brûleur", "corps de chauffe", "anode", "gicleur",
      "vase d'expansion", "dosseret", "kit de nettoyage", "stove", "logano",
      "condens 2000", "condens 4500", "condens 5000", "condens 7000", "condens 9000",
      "olio condens", "mégalis", "stellis", "écolis", "égalis"
    ],
    "include_keywords": [
      "pac", "pompe à chaleur", "climate", "compress", "gainable", "split", 
      "climatiseur", "easycontrol", "régulation", "ballon", "module hydraulique",
      "liaison", "condensats", "console", "cassette", "plénum", "plenum", "diffuseur"
    ]
  },

  "category_rules": [
    {
      "target_category": "outdoor_split",
      "priority": 10,
      "match": {
        "libelle_regex": "(?:u\\.ext|groupe ext|outdoor unit|ext\\. monosplit|ext\\. multi)",
        "gamme_regex": "(?:Climate.*|Bosch Climate.*)"
      }
    },
    {
      "target_category": "indoor_ducted",
      "priority": 20,
      "match": {
        "libelle_regex": "(?:gainable|ducted|faux-plafond|encastré)",
        "gamme_regex": "(?:Climate.*(?:L|5000 L|5001 L)|Plenum pret-a-poser)"
      }
    },
    {
      "target_category": "indoor_console",
      "priority": 25,
      "match": {
        "libelle_regex": "(?:console|allège|bas de mur)"
      }
    },
    {
      "target_category": "indoor_wall",
      "priority": 30,
      "match": {
        "libelle_regex": "(?:u\\.int|murale|mural|wall unit)",
        "gamme_regex": "(?:Climate 2000|Climate 3000|Climate 5000|Climate 6000|Climate 7000|Climate Class|Climate.*RAC)"
      }
    },
    {
      "target_category": "pac_air_eau",
      "priority": 40,
      "match": {
        "libelle_regex": "(?:pac a/e|air/eau|pompe à chaleur air/eau|u\\.int\\.hybride|cs3000aws|cs7001iaw)",
        "gamme_regex": "(?:Compress 2000|Compress 3000|Compress 3800|Compress 5800|Compress 6000|Compress 7000|Compress 7400|Compress 8000)"
      }
    },
    {
      "target_category": "dhw_thermodynamic",
      "priority": 45,
      "match": {
        "libelle_regex": "(?:cetd|chauffe-eau thermodynamique|ballon thermodynamique)",
        "gamme_regex": "(?:Compress.*DW|Compress.*DWF|Compress 5001 DW)"
      }
    },
    {
      "target_category": "regulation",
      "priority": 50,
      "match": {
        "fam1": ["F21"],
        "libelle_regex": "(?:easycontrol|ct ?200|régulation|thermostat|passerelle|sonde|trv)"
      }
    },
    {
      "target_category": "accessory",
      "priority": 99,
      "match": {
        "default": true
      }
    }
  ],

  "attribute_extractors": {
    "heating_power_kw": {
      "regex_patterns": [
        "(?:cal|chaud|heating)[^0-9]*([0-9]+[.,]?[0-9]*)\\s*kW",
        "([0-9]+[.,]?[0-9]*)\\s*kW\\s*(?:chaud|cal)",
        "([0-9]+[.,]?[0-9]*)\\s*kW",
        "(?:AWES|AWB|AWE)\\s*[0-9]+-([0-9]+)",
        "(?:CL[0-9]+i[A-Z]+)([0-9]{2})E"
      ],
      "default_multiplier": 1.0,
      "pattern_evaluations": {
        "(?:CL[0-9]+i[A-Z]+)([0-9]{2})E": "divide_by_10"
      }
    },
    "cooling_power_kw": {
      "regex_patterns": [
        "(?:frig|froid|cooling)[^0-9]*([0-9]+[.,]?[0-9]*)\\s*kW",
        "([0-9]+[.,]?[0-9]*)\\s*kW\\s*(?:froid|frig)",
        "([0-9]+[.,]?[0-9]*)\\s*kW"
      ]
    },
    "flow_nominal_m3h": {
      "regex_patterns": [
        "débit[^0-9]*([0-9]{3,4})\\s*m[3³]/h",
        "([0-9]{3,4})\\s*m[3³]/h"
      ]
    },
    "flow_min_m3h": {
      "regex_patterns": [
        "débit\\s*(?:min|silence|petite)[^0-9]*([0-9]{3,4})\\s*m[3³]/h"
      ]
    },
    "flow_max_m3h": {
      "regex_patterns": [
        "débit\\s*(?:max|boost|grande)[^0-9]*([0-9]{3,4})\\s*m[3³]/h"
      ]
    },
    "sound_pressure_min_db": {
      "regex_patterns": [
        "([0-9]{2})\\s*dB\\(A\\)"
      ]
    },
    "max_static_pressure_pa": {
      "regex_patterns": [
        "ESP[^0-9]*([0-9]{2,3})\\s*Pa",
        "([0-9]{2,3})\\s*Pa"
      ]
    },
    "refrigerant_type": {
      "regex_patterns": [
        "(R32|R410[aA]|R290|R454[cC])"
      ],
      "normalize": {
        "R410a": "R410A",
        "r32": "R32",
        "r290": "R290"
      },
      "default": "R32"
    },
    "power_supply": {
      "regex_patterns": [
        "(230\\s*V|400\\s*V|triphasé|monophasé|1~|3~)"
      ],
      "normalize": {
        "230V": "1~/50Hz/230V",
        "230 V": "1~/50Hz/230V",
        "monophasé": "1~/50Hz/230V",
        "400V": "3~/50Hz/400V",
        "400 V": "3~/50Hz/400V",
        "triphasé": "3~/50Hz/400V"
      },
      "default": "1~/50Hz/230V"
    },
    "liquid_pipe_diameter": {
      "regex_patterns": [
        "(?:liaison|tube|cuivre)?[^0-9]*(1/4|3/8)[\"″]"
      ],
      "default": "1/4\""
    },
    "gas_pipe_diameter": {
      "regex_patterns": [
        "(?:liaison|tube|cuivre)?[^0-9]*(3/8|1/2|5/8|3/4)[\"″]"
      ],
      "default": "3/8\""
    },
    "pricing": {
      "price_ht_field": "TARIFD",
      "price_ht_fallback_field": "TARIF",
      "eco_tax_block": "B04_REGLEMENTAIRE",
      "eco_tax_filter": {
        "RTYP": "CONTRIB",
        "RCODE1": "DEEE"
      },
      "eco_tax_value_field": "RVAL"
    }
  }
}
