from typing import Any

from api_initializer.event_clusters import Event
from api_validations.response import (
    PaginateOnly, 
    Pagination, 
    PaginationResult, 
    PostgresResponseSingle, 
    PostgresResponse, 
    EndpointResponse
)
from schemas import (
    Build,
    BuildParts,
    AccountRecords,
)
from api_validations.defaults.validations import CommonHeaders


# List all endpoint Super Parts
SuperPartsListEvent = Event(
    name="super_parts_list",
    key="018e659d-380d-4b2a-b5a4-d77530cb8de0",
    request_validator=None,  # TODO: Add request validator
    response_validator=None,  # TODO: Add response validator
    description="Super Parts List all endpoint",
)

# Create endpoint Super Parts
SuperPartsCreateEvent = Event(
    name="super_parts_create",
    key="fdfede54-f0e7-4d48-8eae-269479ad9abb",
    request_validator=None,  # TODO: Add request validator
    response_validator=None,  # TODO: Add response validator
    description="Super Parts Create endpoint",
)

# Update endpoint Super Parts
SuperPartsUpdateEvent = Event(
    name="super_parts_update",
    key="ace6137c-fe8e-45bd-ae51-bc1c293f8373",
    request_validator=None,  # TODO: Add request validator
    response_validator=None,  # TODO: Add response validator
    description="Super Parts Update endpoint",
)

# Delete endpoint Super Parts
SuperPartsDeleteEvent = Event(
    name="super_parts_delete",
    key="8fb7f505-7a3a-4260-9959-ae0e5c8f9bfe",
    request_validator=None,  # TODO: Add request validator
    response_validator=None,  # TODO: Add response validator
    description="Super Parts Delete endpoint",
)


def super_parts_list_callable(list_options: PaginateOnly, headers: CommonHeaders):
    return {
        "message": "MSG0003-LIST",
        "data": None,
        "completed": True,
    }


SuperPartsListEvent.event_callable = super_parts_list_callable


def super_parts_create_callable(data, headers: CommonHeaders):
    return {
        "message": "MSG0001-INSERT",
        "data": None,
        "completed": True,
    }


SuperPartsCreateEvent.event_callable = super_parts_create_callable


def super_parts_update_callable(data, headers: CommonHeaders):
    return {
        "message": "MSG0002-UPDATE",
        "data": None,
        "completed": True,
    }


SuperPartsUpdateEvent.event_callable = super_parts_update_callable


def super_parts_delete_callable(uu_id: str, headers: CommonHeaders):
    return {
        "message": "MSG0003-DELETE",
        "data": None,
        "completed": True,
    }


SuperPartsDeleteEvent.event_callable = super_parts_delete_callable
