from backend.Funding import EligibilityCaveats

innovation_scenarios = [
    # 1) Innovation PV, non-eligible heating system in place, EPC D - not eligible
    {
        "description": "Innovation PV, non-eligible heating system in place, EPC D",
        "measures": [{"type": "solar_pv", "is_innovation": True, "innovation_uplift": 0.45}],
        "starting_sap": 60,
        "mainheat_description": "Electric storage heaters",
        "heating_control_description": "Manual charge control",
        "has_wall_insulation_recommendation": False,
        "has_roof_insulation_recommendation": False,
        "expected_eligibility": False,
        "expected_caveats": [EligibilityCaveats.SOLAR_NEEDS_HEATING],
    },
    # 2) Innovation PV, eligible heating system in place, EPC D - eligible
    {
        "description": "Innovation PV, eligible heating system in place, EPC D",
        "measures": [{"type": "solar_pv", "is_innovation": True, "innovation_uplift": 0.45}],
        "starting_sap": 60,
        "mainheat_description": "Air source heat pump, radiators",
        "heating_control_description": "Programmer, room thermostat and TRVs",
        "has_wall_insulation_recommendation": False,
        "has_roof_insulation_recommendation": False,
        "expected_eligibility": True,
        "expected_caveats": [],
    },
    # 3) Innovation PV, non-eligible heating system, heating upgrade to HHRSH, EPC E - eligible
    {
        "description": "Innovation PV + HHRSH upgrade, EPC E",
        "measures": [
            {"type": "solar_pv", "is_innovation": True, "innovation_uplift": 0.45},
            {"type": "high_heat_retention_storage_heaters", "is_innovation": False, "innovation_uplift": 0}
        ],
        "starting_sap": 50,
        "mainheat_description": "Electric storage heaters",
        "heating_control_description": "Manual charge control",
        "has_wall_insulation_recommendation": False,
        "has_roof_insulation_recommendation": False,
        "expected_eligibility": True,
        "expected_caveats": [],
    },
    # 4) Innovation PV + HHRSH upgrade
    {
        "description": "Innovation PV + HHRSH upgrade, EPC E",
        "measures": [
            {"type": "solar_pv", "is_innovation": True, "innovation_uplift": 0.45},
            {"type": "high_heat_retention_storage_heaters", "is_innovation": False, "innovation_uplift": 0}
        ],
        "starting_sap": 50,
        "mainheat_description": "Electric storage heaters",
        "heating_control_description": "Manual charge control",
        "has_wall_insulation_recommendation": False,
        "has_roof_insulation_recommendation": False,
        "expected_eligibility": True,
        "expected_caveats": [],
    },
    # 5) Innovation PV, needs wall insulation, no wall insulation measure - not eligible
    {
        "description": "Innovation PV, wall insulation recommended, but not installed",
        "measures": [{"type": "solar_pv", "is_innovation": True, "innovation_uplift": 0.45}],
        "starting_sap": 60,
        "mainheat_description": "Air source heat pump, radiators",
        "heating_control_description": "Programmer, room thermostat and TRVs",
        "has_wall_insulation_recommendation": True,
        "has_roof_insulation_recommendation": False,
        "expected_eligibility": False,
        "expected_caveats": [EligibilityCaveats.MINIMUM_INSULATION_PRECONDITIONS_NOT_MET],
    },
    # 6) Innovation PV, wall insulation recommended and installed - eligible
    {
        "description": "Innovation PV, wall insulation recommended and installed",
        "measures": [
            {"type": "solar_pv", "is_innovation": True, "innovation_uplift": 0.45},
            {"type": "internal_wall_insulation", "is_innovation": False, "innovation_uplift": 0.25}
        ],
        "starting_sap": 60,
        "mainheat_description": "Air source heat pump, radiators",
        "heating_control_description": "Programmer, room thermostat and TRVs",
        "has_wall_insulation_recommendation": True,
        "has_roof_insulation_recommendation": False,
        "expected_eligibility": True,
        "expected_caveats": [],
    },
    # 7) Innovation PV, needs roof insulation, no roof insulation measure - not eligible
    {
        "description": "Innovation PV, roof insulation recommended, not installed",
        "measures": [{"type": "solar_pv", "is_innovation": True, "innovation_uplift": 0.45}],
        "starting_sap": 60,
        "mainheat_description": "Air source heat pump, radiators",
        "heating_control_description": "Programmer, room thermostat and TRVs",
        "has_wall_insulation_recommendation": False,
        "has_roof_insulation_recommendation": True,
        "expected_eligibility": False,
        "expected_caveats": [EligibilityCaveats.MINIMUM_INSULATION_PRECONDITIONS_NOT_MET],
    },
    # 8) Innovation PV, roof insulation recommended and installed - eligible
    {
        "description": "Innovation PV, roof insulation recommended and installed",
        "measures": [
            {"type": "solar_pv", "is_innovation": True, "innovation_uplift": 0.45},
            {"type": "loft_insulation", "is_innovation": False, "innovation_uplift": 0}
        ],
        "starting_sap": 60,
        "mainheat_description": "Air source heat pump, radiators",
        "heating_control_description": "Programmer, room thermostat and TRVs",
        "has_wall_insulation_recommendation": False,
        "has_roof_insulation_recommendation": True,
        "expected_eligibility": True,
        "expected_caveats": [],
    },
    # 9) Innovation PV, needs both roof + wall insulation, no insulation - not eligible
    {
        "description": "Innovation PV, both insulations recommended, none installed",
        "measures": [{"type": "solar_pv", "is_innovation": True, "innovation_uplift": 0.45}],
        "starting_sap": 60,
        "mainheat_description": "Air source heat pump, radiators",
        "heating_control_description": "Programmer, room thermostat and TRVs",
        "has_wall_insulation_recommendation": True,
        "has_roof_insulation_recommendation": True,
        "expected_eligibility": False,
        "expected_caveats": [EligibilityCaveats.MINIMUM_INSULATION_PRECONDITIONS_NOT_MET],
    },
    # 10) Innovation PV, both recommended, only wall insulation installed - not eligible
    {
        "description": "Innovation PV, both insulations recommended, only wall done",
        "measures": [
            {"type": "solar_pv", "is_innovation": True, "innovation_uplift": 0.45},
            {"type": "internal_wall_insulation", "is_innovation": False, "innovation_uplift": 0.25}
        ],
        "starting_sap": 60,
        "mainheat_description": "Air source heat pump, radiators",
        "heating_control_description": "Programmer, room thermostat and TRVs",
        "has_wall_insulation_recommendation": True,
        "has_roof_insulation_recommendation": True,
        "expected_eligibility": False,
        "expected_caveats": [EligibilityCaveats.MINIMUM_INSULATION_PRECONDITIONS_NOT_MET],
    },
    # 11) Innovation PV, both recommended, only roof insulation installed - not eligible
    {
        "description": "Innovation PV, both insulations recommended, only roof done",
        "measures": [
            {"type": "solar_pv", "is_innovation": True, "innovation_uplift": 0.45},
            {"type": "loft_insulation", "is_innovation": False, "innovation_uplift": 0}
        ],
        "starting_sap": 60,
        "mainheat_description": "Air source heat pump, radiators",
        "heating_control_description": "Programmer, room thermostat and TRVs",
        "has_wall_insulation_recommendation": True,
        "has_roof_insulation_recommendation": True,
        "expected_eligibility": False,
        "expected_caveats": [EligibilityCaveats.MINIMUM_INSULATION_PRECONDITIONS_NOT_MET],
    },
    # 12) Innovation PV, both recommended, both installed - eligible
    {
        "description": "Innovation PV, both insulations recommended and installed",
        "measures": [
            {"type": "solar_pv", "is_innovation": True, "innovation_uplift": 0.45},
            {"type": "internal_wall_insulation", "is_innovation": False, "innovation_uplift": 0.25},
            {"type": "loft_insulation", "is_innovation": False, "innovation_uplift": 0}
        ],
        "starting_sap": 60,
        "mainheat_description": "Air source heat pump, radiators",
        "heating_control_description": "Programmer, room thermostat and TRVs",
        "has_wall_insulation_recommendation": True,
        "has_roof_insulation_recommendation": True,
        "expected_eligibility": True,
        "expected_caveats": [],
    },
]
