from api_initializer.event_clusters import EventCluster, RouterCluster
from index import endpoints_index
from .supers_events import (
    SuperPartsListEvent,
    SuperPartsCreateEvent,
    SuperPartsUpdateEvent,
    SuperPartsDeleteEvent,
)

PartsRouterCluster = RouterCluster(name="PartsRouterCluster")

PartsListEventCluster = EventCluster(name="PartsListEventCluster", endpoint_uu_id=endpoints_index["PartsList"])
PartsListEventCluster.add_event(SuperPartsListEvent)

PartsCreateEventCluster = EventCluster(name="PartsCreateEventCluster", endpoint_uu_id=endpoints_index["PartsCreate"])
PartsCreateEventCluster.add_event(SuperPartsCreateEvent)

PartsUpdateEventCluster = EventCluster(name="PartsUpdateEventCluster", endpoint_uu_id=endpoints_index["PartsUpdate"])
PartsUpdateEventCluster.add_event(SuperPartsUpdateEvent)

PartsDeleteEventCluster = EventCluster(name="PartsDeleteEventCluster", endpoint_uu_id=endpoints_index["PartsDelete"])
PartsDeleteEventCluster.add_event(SuperPartsDeleteEvent)

PartsRouterCluster.set_event_cluster(PartsListEventCluster)
PartsRouterCluster.set_event_cluster(PartsCreateEventCluster)
PartsRouterCluster.set_event_cluster(PartsUpdateEventCluster)
PartsRouterCluster.set_event_cluster(PartsDeleteEventCluster)
