from api_initializer.event_clusters import EventCluster, RouterCluster
from index import endpoints_index
from .supers_events import (
    EventsListAvailableEvent,
    EventsListAppendedEvent,
    EventRegisterServiceEvent,
    EventUnRegisterServiceEvent,
    EventBindEmployeeExtraEvent,
    EventBindOccupantExtraEvent,
)

EventsEndpointRouterCluster = RouterCluster(name="EventsEndpointRouterCluster")

EventsEndpointEventClusterListAvailable = EventCluster(name="EventsListAvailable", endpoint_uu_id=endpoints_index["EventsListAvailable"])
EventsEndpointEventClusterListAvailable.add_event(EventsListAvailableEvent)

EventsEndpointEventClusterListAppended = EventCluster(name="EventsListAppended", endpoint_uu_id=endpoints_index["EventsListAppended"])
EventsEndpointEventClusterListAppended.add_event(EventsListAppendedEvent)

EventsEndpointEventClusterRegisterService = EventCluster(name="EventRegisterService", endpoint_uu_id=endpoints_index["EventRegisterService"])
EventsEndpointEventClusterRegisterService.add_event(EventRegisterServiceEvent)

EventsEndpointEventClusterUnregisterService = EventCluster(name="EventUnregisterService", endpoint_uu_id=endpoints_index["EventUnRegisterService"])
EventsEndpointEventClusterUnregisterService.add_event(EventUnRegisterServiceEvent)

EventsEndpointEventClusterBindEmployeeExtra = EventCluster(name="EventBindExtraEmployee", endpoint_uu_id=endpoints_index["EventBindExtraEmployee"])
EventsEndpointEventClusterBindEmployeeExtra.add_event(EventBindEmployeeExtraEvent)

EventsEndpointEventClusterBindOccupantExtra = EventCluster(name="EventBindExtraOccupant", endpoint_uu_id=endpoints_index["EventBindExtraOccupant"])
EventsEndpointEventClusterBindOccupantExtra.add_event(EventBindOccupantExtraEvent)

EventsEndpointRouterCluster.set_event_cluster(EventsEndpointEventClusterListAvailable)
EventsEndpointRouterCluster.set_event_cluster(EventsEndpointEventClusterListAppended)
EventsEndpointRouterCluster.set_event_cluster(EventsEndpointEventClusterRegisterService)
EventsEndpointRouterCluster.set_event_cluster(EventsEndpointEventClusterUnregisterService)
EventsEndpointRouterCluster.set_event_cluster(EventsEndpointEventClusterBindEmployeeExtra)
EventsEndpointRouterCluster.set_event_cluster(EventsEndpointEventClusterBindOccupantExtra)
