"""Constants for the aionisource library."""

from enum import StrEnum


class NiSourceUtility(StrEnum):
    """NiSource utility companies."""

    COLUMBIA_GAS_OHIO = "columbia_gas_ohio"
    COLUMBIA_GAS_VIRGINIA = "columbia_gas_virginia"
    COLUMBIA_GAS_MARYLAND = "columbia_gas_maryland"
    COLUMBIA_GAS_KENTUCKY = "columbia_gas_kentucky"
    COLUMBIA_GAS_PENNSYLVANIA = "columbia_gas_pennsylvania"
    NIPSCO = "nipsco"

    @property
    def base_url(self) -> str:
        """Return the base URL for this utility's portal."""
        urls = {
            NiSourceUtility.COLUMBIA_GAS_OHIO: "https://myaccount.columbiagasohio.com",
            NiSourceUtility.COLUMBIA_GAS_VIRGINIA: "https://myaccount.columbiagasva.com",
            NiSourceUtility.COLUMBIA_GAS_MARYLAND: "https://myaccount.columbiagasmd.com",
            NiSourceUtility.COLUMBIA_GAS_KENTUCKY: "https://myaccount.columbiagasky.com",
            NiSourceUtility.COLUMBIA_GAS_PENNSYLVANIA: "https://myaccount.columbiagaspa.com",
            NiSourceUtility.NIPSCO: "https://myaccount.nipsco.com",
        }
        return urls[self]

    @property
    def display_name(self) -> str:
        """Return a human-readable name for this utility."""
        names = {
            NiSourceUtility.COLUMBIA_GAS_OHIO: "Columbia Gas of Ohio",
            NiSourceUtility.COLUMBIA_GAS_VIRGINIA: "Columbia Gas of Virginia",
            NiSourceUtility.COLUMBIA_GAS_MARYLAND: "Columbia Gas of Maryland",
            NiSourceUtility.COLUMBIA_GAS_KENTUCKY: "Columbia Gas of Kentucky",
            NiSourceUtility.COLUMBIA_GAS_PENNSYLVANIA: "Columbia Gas of Pennsylvania",
            NiSourceUtility.NIPSCO: "NIPSCO",
        }
        return names[self]
