from typing import Any

from api_initializer.event_clusters import Event
from api_validations.response import (
    PaginateOnly, 
    Pagination, 
    PaginationResult, 
    PostgresResponseSingle, 
    PostgresResponse, 
    EndpointResponse
)
from api_validations.token.validations import TokenDictType
from schemas import (
    Build,
    BuildLivingSpace,
    BuildParts,
    Users,
    UsersTokens,
    People,
)

# List all endpoint Super User
SuperUserListEvent = Event(
    name="super_user_list",
    key="202eec81-b382-4623-911b-709f1b841f3f",
    request_validator=None,  # TODO: Add request validator
    response_validator=None,  # TODO: Add response validator
    description="Super Users List all flat representative users endpoint",
)

# Create endpoint Super User
SuperUserCreateEvent = Event(
    name="super_user_create",
    key="2f0a3691-114d-48b7-b166-9572fc889695",
    request_validator=None,  # TODO: Add request validator
    response_validator=None,  # TODO: Add response validator
    description="Super Users Create flat representative users endpoint",
)

# Update endpoint Super User
SuperUserUpdateEvent = Event(
    name="super_user_update",
    key="8a8c8dd6-43ad-40df-86bd-345488273f52",
    request_validator=None,  # TODO: Add request validator
    response_validator=None,  # TODO: Add response validator
    description="Super Users Update flat representative users endpoint",
)

# Delete endpoint Super User
SuperUserDeleteEvent = Event(
    name="super_user_delete",
    key="e8c77554-4b0e-491f-aab5-67a5ef670999",
    request_validator=None,  # TODO: Add request validator
    response_validator=None,  # TODO: Add response validator
    description="Super Users Delete flat representative users endpoint",
)


def super_user_list_callable(list_options: PaginateOnly, token: TokenDictType):
    return {
        "message": "MSG0003-LIST",
        "data": None,
        "completed": True,
    }


SuperUserListEvent.event_callable = super_user_list_callable


def super_user_create_callable(data: dict, token: TokenDictType):
    return {
        "message": "MSG0001-INSERT",
        "data": None,
        "completed": True,
    }


SuperUserCreateEvent.event_callable = super_user_create_callable


def super_user_update_callable(data: dict, token: TokenDictType):
    return {
        "message": "MSG0002-UPDATE",
        "data": None,
        "completed": True,
    }


SuperUserUpdateEvent.event_callable = super_user_update_callable


def super_user_delete_callable(data: dict, token: TokenDictType):
    return {
        "message": "MSG0004-DELETE",
        "data": None,
        "completed": True,
    }


SuperUserDeleteEvent.event_callable = super_user_delete_callable
