from api_initializer.event_clusters import EventCluster, RouterCluster
from index import endpoints_index
from .supers_events import (
    SuperPeopleListEvent,
    SuperPeopleCreateEvent,
    SuperPeopleUpdateEvent,
    SuperPeopleDeleteEvent,
)

PeopleRouterCluster = RouterCluster(name="PeopleRouterCluster")

PeopleListEventCluster = EventCluster(name="PeopleListEventCluster", endpoint_uu_id=endpoints_index["PeopleList"])
PeopleListEventCluster.add_event(SuperPeopleListEvent)

PeopleCreateEventCluster = EventCluster(name="PeopleCreateEventCluster", endpoint_uu_id=endpoints_index["PeopleCreate"])
PeopleCreateEventCluster.add_event(SuperPeopleCreateEvent)

PeopleUpdateEventCluster = EventCluster(name="PeopleUpdateEventCluster", endpoint_uu_id=endpoints_index["PeopleUpdate"])
PeopleUpdateEventCluster.add_event(SuperPeopleUpdateEvent)

PeopleDeleteEventCluster = EventCluster(name="PeopleDeleteEventCluster", endpoint_uu_id=endpoints_index["PeopleDelete"])
PeopleDeleteEventCluster.add_event(SuperPeopleDeleteEvent)

PeopleRouterCluster.set_event_cluster(PeopleListEventCluster)
PeopleRouterCluster.set_event_cluster(PeopleCreateEventCluster)
PeopleRouterCluster.set_event_cluster(PeopleUpdateEventCluster)
PeopleRouterCluster.set_event_cluster(PeopleDeleteEventCluster)
