# This file was auto-generated by Fern from our API Definition.

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class Minerals(str, enum.Enum):
    """
    ℹ️ This enum is non-exhaustive.
    """

    SODIUM = "sodium"
    POTASSIUM = "potassium"
    CALCIUM = "calcium"
    PHOSPHORUS = "phosphorus"
    MAGNESIUM = "magnesium"
    IRON = "iron"
    ZINC = "zinc"
    FLUORIDE = "fluoride"
    CHLORIDE = "chloride"
    _UNKNOWN = "__MINERALS_UNKNOWN__"
    """
    This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
    """

    @classmethod
    def _missing_(cls, value: typing.Any) -> "Minerals":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        sodium: typing.Callable[[], T_Result],
        potassium: typing.Callable[[], T_Result],
        calcium: typing.Callable[[], T_Result],
        phosphorus: typing.Callable[[], T_Result],
        magnesium: typing.Callable[[], T_Result],
        iron: typing.Callable[[], T_Result],
        zinc: typing.Callable[[], T_Result],
        fluoride: typing.Callable[[], T_Result],
        chloride: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is Minerals.SODIUM:
            return sodium()
        if self is Minerals.POTASSIUM:
            return potassium()
        if self is Minerals.CALCIUM:
            return calcium()
        if self is Minerals.PHOSPHORUS:
            return phosphorus()
        if self is Minerals.MAGNESIUM:
            return magnesium()
        if self is Minerals.IRON:
            return iron()
        if self is Minerals.ZINC:
            return zinc()
        if self is Minerals.FLUORIDE:
            return fluoride()
        if self is Minerals.CHLORIDE:
            return chloride()
        return _unknown_member(self._value_)
