from typing_extensions import TypedDict
from typing import Literal, NotRequired


class StartResponse(TypedDict):
    status: Literal["running", "started"]


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


class StatusResponse(TypedDict):
    status: Literal["online", "offline", "crashed", "maintainance", "starting"]
    reason: NotRequired[str]
    motd: NotRequired[str]
    icon: NotRequired[str | None]
    players: NotRequired[StatusResponsePlayers]


class Responses:
    StartResponse = StartResponse
    StatusResponsePlayers = StatusResponsePlayers
    StatusResponse = StatusResponse
