from api_initializer.event_clusters import EventCluster, RouterCluster
from index import endpoints_index
from .supers_events import (
    SuperServiceListEvent,
    SuperServiceCreateEvent,
    SuperServiceUpdateEvent,
    SuperServiceDeleteEvent,
)

ServicesRouterCluster = RouterCluster(name="ServicesRouterCluster")

ServicesEventClusterList = EventCluster(name="ServicesList", endpoint_uu_id=endpoints_index["ServicesList"])
ServicesEventClusterList.add_event(SuperServiceListEvent)

ServicesEventClusterCreate = EventCluster(name="ServicesCreate", endpoint_uu_id=endpoints_index["ServicesCreate"])
ServicesEventClusterCreate.add_event(SuperServiceCreateEvent)

ServicesEventClusterUpdate = EventCluster(name="ServicesUpdate", endpoint_uu_id=endpoints_index["ServicesUpdate"])
ServicesEventClusterUpdate.add_event(SuperServiceUpdateEvent)

ServicesEventClusterDelete = EventCluster(name="ServicesDelete", endpoint_uu_id=endpoints_index["ServicesDelete"])
ServicesEventClusterDelete.add_event(SuperServiceDeleteEvent)

ServicesRouterCluster.set_event_cluster(ServicesEventClusterList)
ServicesRouterCluster.set_event_cluster(ServicesEventClusterCreate)
ServicesRouterCluster.set_event_cluster(ServicesEventClusterUpdate)
ServicesRouterCluster.set_event_cluster(ServicesEventClusterDelete)
