from enum import Enum
from typing import List


class EpcWallDescriptions(Enum):
    # Cavity wall descriptions
    cavity_insulated_assumed: str = "Cavity wall, as built, insulated (assumed)"
    cavity_partial_insulated_assumed: str = "Cavity wall, as built, partial insulation (assumed)"
    cavity_no_insulation_assumed: str = "Cavity wall, as built, no insulation (assumed)"
    cavity_filled_cavity: str = "Cavity wall, filled cavity"
    cavity_internal_insulation: str = "Cavity wall, with internal insulation"
    cavity_external_insulation: str = "Cavity wall, with external insulation"
    cavity_filled_plus_internal: str = "Cavity wall, filled cavity and internal insulation"
    cavity_filled_plus_external: str = "Cavity wall, filled cavity and external insulation"

    # Solid wall descriptions
    solid_brick_internal_insulation: str = "Solid brick, with internal insulation"
    solid_brick_external_insulation: str = "Solid brick, with external insulation"
    solid_brick_no_insulation_assumed: str = 'Solid brick, as built, no insulation (assumed)'
    solid_brick_partial_insulated_assumed: str = 'Solid brick, as built, partial insulation (assumed)'
    solid_brick_insulated_assumed: str = 'Solid brick, as built, insulated (assumed)'

    # System
    system_external_insulation: str = "System built, with external insulation"
    system_internal_insulation: str = "System built, with internal insulation"
    system_no_insulation_assumed: str = "System built, as built, no insulation (assumed)"
    system_partial_insulated_assumed: str = "System built, as built, partial insulation (assumed)"
    system_insulated_assumed: str = "System built, as built, insulated (assumed)"

    # Timber
    timber_frame_internal_insulation: str = "Timber frame, with internal insulation"
    timber_frame_external_insulation: str = "Timber frame, with external insulation"
    timber_frame_no_insulation_assumed: str = "Timber frame, as built, no insulation (assumed)"
    timber_frame_partial_insulated_assumed: str = "Timber frame, as built, partial insulation (assumed)"
    timber_frame_insulated_assumed: str = "Timber frame, as built, insulated (assumed)"

    # Granite/whinstone
    granite_whinstone_external_insulation: str = "Granite or whin, with external insulation"
    granite_whinstone_internal_insulation: str = "Granite or whin, with internal insulation"
    granite_whinstone_no_insulation_assumed: str = "Granite or whin, as built, no insulation (assumed)"
    granite_whinstone_partial_insulated_assumed: str = "Granite or whin, as built, partial insulation (assumed)"
    granite_whinestone_insulated_assumed: str = "Granite or whin, as built, insulated (assumed)"

    # Sandstone/limestone
    sandstone_limestone_internal_insulation: str = "Sandstone, with internal insulation"
    sandstone_limestone_external_insulation: str = "Sandstone, with external insulation"
    sandstone_limestone_no_insulation_assumed: str = "Sandstone, as built, no insulation (assumed)"
    sandstone_limestone_partial_insulated_assumed: str = "Sandstone, as built, partial insulation (assumed)"
    sandstone_limestone_insulated_assumed: str = "Sandstone, as built, insulated (assumed)"

    # Cob
    cob_as_built_average: str = "Cob, as built"
    cob_as_built_good: str = "Cob, as built"

    # unknown descriptions which may get mapped later or handled via fallback
    cavity_as_built_unknown: str = "Cavity wall, as built, unknown insulation"
    solid_brick_as_built_unknown: str = "Solid brick, as built, unknown insulation"
    system_as_built_unknown: str = "System built, as built, unknown insulation"
    timber_frame_as_built_unknown: str = "Timber frame, as built, unknown insulation"
    granite_as_built_unknown: str = "Granite or whin, as built, unknown insulation"
    sandstone_as_built_unknown: str = "Sandstone, as built, unknown insulation"
    cob_as_built_unknown: str = "Cob, as built, unknown insulation"

    @property
    def unknown_descriptions(self) -> List["EpcWallDescriptions"]:
        return [
            EpcWallDescriptions.cavity_as_built_unknown,
            EpcWallDescriptions.solid_brick_as_built_unknown,
            EpcWallDescriptions.system_as_built_unknown,
            EpcWallDescriptions.timber_frame_as_built_unknown,
            EpcWallDescriptions.granite_as_built_unknown,
            EpcWallDescriptions.sandstone_as_built_unknown,
            EpcWallDescriptions.cob_as_built_unknown,
        ]
