from enum import Enum
from typing_extensions import TypedDict
from typing import NotRequired


class ProcessStatus(Enum):
    RUNNING = None
    STOPPED = 0
    CRASHED = 1


class ServerPlayersList(TypedDict):
    online: int
    max: int
    list: list[str]


class ServerStatus(TypedDict):
    online: bool
    icon: NotRequired[str | None]
    motd: NotRequired[str]
    players: NotRequired[ServerPlayersList]
