from typing import override

from flut._flut.engine import FlutAbstractObject


class _MouseCursor(FlutAbstractObject):
    def __init__(self, kind: str):
        super().__init__("MouseCursor")
        self.kind = kind

    def createSession(self, device: int):
        pass

    @override
    def _flut_pack(self) -> dict:
        result = self._flut_base_props()
        result["kind"] = self.kind
        result["createSessionActionId"] = self._register_action(
            self.createSession, _MouseCursor, "createSession"
        )
        return result


class MouseCursor(_MouseCursor):
    defer = _MouseCursor("defer")


class SystemMouseCursors:
    basic = MouseCursor("basic")
    click = MouseCursor("click")
    text = MouseCursor("text")
    resizeLeftRight = MouseCursor("resizeLeftRight")
    resizeUpDown = MouseCursor("resizeUpDown")
    resizeColumn = MouseCursor("resizeColumn")
    resizeRow = MouseCursor("resizeRow")
    grab = MouseCursor("grab")
    grabbing = MouseCursor("grabbing")
    move = MouseCursor("move")
    forbidden = MouseCursor("forbidden")
    wait = MouseCursor("wait")
