from backend.Funding import EligibilityCaveats

heating_scenarios = [
    {
        "description": "EPC D with ASHP and no insulation at all — fails precondition 1",
        "measures": [{"type": "air_source_heat_pump"}],
        "starting_sap": 60,
        "mainheat_description": "air source heat pump",
        "heating_control_description": "roomstat_programmer_trvs",
        "has_wall_insulation_recommendation": True,
        "has_roof_insulation_recommendation": False,
        "expected_eligibility": False,
        "expected_caveats": [EligibilityCaveats.MINIMUM_INSULATION_PRECONDITIONS_NOT_MET],
    },
    {
        "description": "EPC D with ASHP and no insulation at all — fails precondition 1",
        "measures": [{"type": "air_source_heat_pump"}],
        "starting_sap": 60,
        "mainheat_description": "air source heat pump",
        "heating_control_description": "roomstat_programmer_trvs",
        "has_wall_insulation_recommendation": False,
        "has_roof_insulation_recommendation": False,
        "expected_eligibility": False,
        "expected_caveats": [EligibilityCaveats.MINIMUM_INSULATION_PRECONDITIONS_NOT_MET],
    },
    {
        "description": "EPC D with ASHP and floor insulation — passes precondition 1",
        "measures": [
            {"type": "air_source_heat_pump"},
            {"type": "suspended_floor_insulation"}
        ],
        "starting_sap": 60,
        "has_wall_insulation_recommendation": False,
        "has_roof_insulation_recommendation": False,
        "mainheat_description": "air source heat pump",
        "heating_control_description": "roomstat_programmer_trvs",
        "expected_eligibility": True,
        "expected_caveats": [],
    },
    {
        "description": "EPC E with ASHP and only floor insulation — fails precondition 2 due to missing wall/roof",
        "measures": [
            {"type": "air_source_heat_pump"},
            {"type": "suspended_floor_insulation"}
        ],
        "starting_sap": 45,
        "mainheat_description": "air source heat pump",
        "heating_control_description": "roomstat_programmer_trvs",
        "has_wall_insulation_recommendation": True,
        "has_roof_insulation_recommendation": True,
        "expected_eligibility": False,
        "expected_caveats": [EligibilityCaveats.MINIMUM_INSULATION_PRECONDITIONS_NOT_MET],
    },
    {
        "description": "EPC E with ASHP and both wall and roof insulation — passes precondition 2",
        "measures": [
            {"type": "air_source_heat_pump"},
            {"type": "external_wall_insulation"},
            {"type": "loft_insulation"}
        ],
        "starting_sap": 45,
        "mainheat_description": "air source heat pump",
        "heating_control_description": "roomstat_programmer_trvs",
        "has_wall_insulation_recommendation": True,
        "has_roof_insulation_recommendation": True,
        "expected_eligibility": True,
        "expected_caveats": [],
    },
    {
        "description": "EPC D with FTCH and no insulation — still passes (exempt from precondition 1)",
        "measures": [{"type": "first_time_central_heating"}],
        "starting_sap": 60,
        "mainheat_description": "none",
        "heating_control_description": "none",
        "expected_eligibility": True,
        "expected_caveats": [],
    },
    {
        "description": "EPC E with FTCH and no insulation — fails precondition 2",
        "measures": [{"type": "first_time_central_heating"}],
        "starting_sap": 45,
        "mainheat_description": "none",
        "heating_control_description": "none",
        "has_wall_insulation_recommendation": True,
        "has_roof_insulation_recommendation": True,
        "expected_eligibility": False,
        "expected_caveats": [EligibilityCaveats.MINIMUM_INSULATION_PRECONDITIONS_NOT_MET],
    },
    {
        "description": "EPC E with FTCH and wall/roof insulation — passes precondition 2",
        "measures": [
            {"type": "first_time_central_heating"},
            {"type": "external_wall_insulation"},
            {"type": "loft_insulation"},
        ],
        "starting_sap": 45,
        "mainheat_description": "none",
        "heating_control_description": "none",
        "has_wall_insulation_recommendation": True,
        "has_roof_insulation_recommendation": True,
        "expected_eligibility": True,
        "expected_caveats": [],
    },
]
