from api_initializer.event_clusters import EventCluster, RouterCluster
from index import endpoints_index
from .supers_events import (
    SuperAreaListEvent,
    SuperAreaCreateEvent,
    SuperAreaUpdateEvent,
    SuperAreaDeleteEvent,
)

AreaRouterCluster = RouterCluster(name="AreaRouterCluster")

AreaListEventCluster = EventCluster(name="AreaListEventCluster", endpoint_uu_id=endpoints_index["AreaList"])
AreaListEventCluster.add_event(SuperAreaListEvent)

AreaCreateEventCluster = EventCluster(name="AreaCreateEventCluster", endpoint_uu_id=endpoints_index["AreaCreate"])
AreaCreateEventCluster.add_event(SuperAreaCreateEvent)

AreaUpdateEventCluster = EventCluster(name="AreaUpdateEventCluster", endpoint_uu_id=endpoints_index["AreaUpdate"])
AreaUpdateEventCluster.add_event(SuperAreaUpdateEvent)

AreaDeleteEventCluster = EventCluster(name="AreaDeleteEventCluster", endpoint_uu_id=endpoints_index["AreaDelete"])
AreaDeleteEventCluster.add_event(SuperAreaDeleteEvent)

AreaRouterCluster.set_event_cluster(AreaListEventCluster)
AreaRouterCluster.set_event_cluster(AreaCreateEventCluster)
AreaRouterCluster.set_event_cluster(AreaUpdateEventCluster)
AreaRouterCluster.set_event_cluster(AreaDeleteEventCluster)
