from typing import Any

from api_validations.defaults.validations import CommonHeaders
from api_initializer.event_clusters import Event
from api_validations.response import (
    PaginateOnly, 
    Pagination, 
    PaginationResult, 
    PostgresResponseSingle, 
    PostgresResponse, 
    EndpointResponse
)
from schemas import (
    Events,
    Event2Employee,
    Event2Occupant,
    Event2EmployeeExtra,
    Event2OccupantExtra,
    Service2Events,
    Services,
)

# List services endpoint
SuperServiceListEvent = Event(
    name="super_service_list",
    key="ea24f5e6-279a-47e7-a5bd-8a5c1bd72d05",
    request_validator=None,  # TODO: Add request validator
    response_validator=None,  # TODO: Add response validator
    description="Super Users List available events endpoint",
)

# Create service endpoint
SuperServiceCreateEvent = Event(
    name="super_service_create",
    key="086051f4-f1ec-4d56-b706-09ce53d5e66c",
    request_validator=None,  # TODO: Add request validator
    response_validator=None,  # TODO: Add response validator
    description="Super Users Create service endpoint",
)

# Update service endpoint
SuperServiceUpdateEvent = Event(
    name="super_service_update",
    key="267956e5-32b7-4b60-ab75-3b56b935d5c1",
    request_validator=None,  # TODO: Add request validator
    response_validator=None,  # TODO: Add response validator
    description="Super Users Update service endpoint",
)

# Delete service endpoint
SuperServiceDeleteEvent = Event(
    name="super_service_delete",
    key="6c333122-272e-4690-9d71-7f5e14cc64c8",
    request_validator=None,  # TODO: Add request validator
    response_validator=None,  # TODO: Add response validator
    description="Super Users Delete service endpoint",
)


def super_service_list_callable(list_options: PaginateOnly, headers: CommonHeaders):
    """List available events with pagination and filtering options"""
    return {
        "message": "MSG0003-LIST",
        "data": None,
        "completed": True,
    }


SuperServiceListEvent.event_callable = super_service_list_callable


def super_service_create_callable(data: Any, headers: CommonHeaders):
    """Create service"""
    return {
        "message": "MSG0003-CREATE",
        "data": None,
        "completed": True,
    }


SuperServiceCreateEvent.event_callable = super_service_create_callable


def super_service_update_callable(data: Any, headers: CommonHeaders):
    """Update service"""
    return {
        "message": "MSG0003-UPDATE",
        "data": None,
        "completed": True,
    }


SuperServiceUpdateEvent.event_callable = super_service_update_callable


def super_service_delete_callable(data: Any, headers: CommonHeaders):
    """Delete service"""
    return {
        "message": "MSG0003-DELETE",
        "data": None,
        "completed": True,
    }


SuperServiceDeleteEvent.event_callable = super_service_delete_callable
