from enum import Enum


# TODO: same as in otadebpayload
class FsInfo(str, Enum):
    TYPE = "type"
    TOTAL = "total"
    USED = "used"
    AVAILABLE = "available"
    MOUNT_DIR = "mount-dir"


class PartitionInfo(str, Enum):
    START = "start"
    END = "end"
    SIZE = "size"
    FILE_SYSTEM = "file_system"
    LABEL = "label"


class DeviceRole(str, Enum):
    CONTROLLER_REMOTE_DISPLAY = "ControllerRemoteDisplay"
    CONTROLLER_LOCAL_HMI = "ControllerLocalHMI"
    REMOTE_DISPLAY_1 = "RemoteDisplay1"
    REMOTE_HMI_1 = "RemoteHMI1"
    REMOTE_HMI_2 = "RemoteHMI2"
    POWER_SINK_CONTROL = "PowerSinkControl"

    def __str__(self):
        return self.value


class OtaState(str, Enum):
    """
    Macroscopic set of OTA state of a display board.

    These states could be sent to base board
    """

    NOTIFY_BOOT_RESCUE = "BOOT_RESCUE"
    NOTIFY_COMPLETE_RESCUE = "COMPLETE_RESCUE"
