import { configureStore } from '@reduxjs/toolkit';
import styleReducer from './styleSlice';
import mainReducer from './mainSlice';
import authSlice from './authSlice';
import openAiSlice from './openAiSlice';

import usersSlice from "./users/usersSlice";
import rolesSlice from "./roles/rolesSlice";
import permissionsSlice from "./permissions/permissionsSlice";
import organizationsSlice from "./organizations/organizationsSlice";
import tenantsSlice from "./tenants/tenantsSlice";
import departmentsSlice from "./departments/departmentsSlice";
import teamsSlice from "./teams/teamsSlice";
import membershipsSlice from "./memberships/membershipsSlice";
import identity_providersSlice from "./identity_providers/identity_providersSlice";
import user_identitiesSlice from "./user_identities/user_identitiesSlice";
import policy_rulesSlice from "./policy_rules/policy_rulesSlice";
import kms_configsSlice from "./kms_configs/kms_configsSlice";
import conference_templatesSlice from "./conference_templates/conference_templatesSlice";
import roomsSlice from "./rooms/roomsSlice";
import room_invitationsSlice from "./room_invitations/room_invitationsSlice";
import conferencesSlice from "./conferences/conferencesSlice";
import participantsSlice from "./participants/participantsSlice";
import conference_nodesSlice from "./conference_nodes/conference_nodesSlice";
import sfu_allocationsSlice from "./sfu_allocations/sfu_allocationsSlice";
import breakout_roomsSlice from "./breakout_rooms/breakout_roomsSlice";
import chat_channelsSlice from "./chat_channels/chat_channelsSlice";
import chat_messagesSlice from "./chat_messages/chat_messagesSlice";
import filesSlice from "./files/filesSlice";
import room_filesSlice from "./room_files/room_filesSlice";
import recordingsSlice from "./recordings/recordingsSlice";
import transcriptsSlice from "./transcripts/transcriptsSlice";
import canvas_documentsSlice from "./canvas_documents/canvas_documentsSlice";
import canvas_eventsSlice from "./canvas_events/canvas_eventsSlice";
import layout_modelsSlice from "./layout_models/layout_modelsSlice";
import layout_preferencesSlice from "./layout_preferences/layout_preferencesSlice";
import federated_learning_updatesSlice from "./federated_learning_updates/federated_learning_updatesSlice";
import ai_companion_sessionsSlice from "./ai_companion_sessions/ai_companion_sessionsSlice";
import knowledge_graph_itemsSlice from "./knowledge_graph_items/knowledge_graph_itemsSlice";
import external_integrationsSlice from "./external_integrations/external_integrationsSlice";
import tasksSlice from "./tasks/tasksSlice";
import coursesSlice from "./courses/coursesSlice";
import course_enrollmentsSlice from "./course_enrollments/course_enrollmentsSlice";
import assignmentsSlice from "./assignments/assignmentsSlice";
import submissionsSlice from "./submissions/submissionsSlice";
import quizzesSlice from "./quizzes/quizzesSlice";
import quiz_resultsSlice from "./quiz_results/quiz_resultsSlice";
import marketplace_appsSlice from "./marketplace_apps/marketplace_appsSlice";
import app_installationsSlice from "./app_installations/app_installationsSlice";
import app_crash_reportsSlice from "./app_crash_reports/app_crash_reportsSlice";
import audit_eventsSlice from "./audit_events/audit_eventsSlice";
import data_subject_requestsSlice from "./data_subject_requests/data_subject_requestsSlice";
import service_incidentsSlice from "./service_incidents/service_incidentsSlice";
import deployment_changesSlice from "./deployment_changes/deployment_changesSlice";
import feature_flagsSlice from "./feature_flags/feature_flagsSlice";
import quality_reportsSlice from "./quality_reports/quality_reportsSlice";
import event_streamsSlice from "./event_streams/event_streamsSlice";
import conference_eventsSlice from "./conference_events/conference_eventsSlice";

export const store = configureStore({
  reducer: {
    style: styleReducer,
    main: mainReducer,
    auth: authSlice,
    openAi: openAiSlice,

users: usersSlice,
roles: rolesSlice,
permissions: permissionsSlice,
organizations: organizationsSlice,
tenants: tenantsSlice,
departments: departmentsSlice,
teams: teamsSlice,
memberships: membershipsSlice,
identity_providers: identity_providersSlice,
user_identities: user_identitiesSlice,
policy_rules: policy_rulesSlice,
kms_configs: kms_configsSlice,
conference_templates: conference_templatesSlice,
rooms: roomsSlice,
room_invitations: room_invitationsSlice,
conferences: conferencesSlice,
participants: participantsSlice,
conference_nodes: conference_nodesSlice,
sfu_allocations: sfu_allocationsSlice,
breakout_rooms: breakout_roomsSlice,
chat_channels: chat_channelsSlice,
chat_messages: chat_messagesSlice,
files: filesSlice,
room_files: room_filesSlice,
recordings: recordingsSlice,
transcripts: transcriptsSlice,
canvas_documents: canvas_documentsSlice,
canvas_events: canvas_eventsSlice,
layout_models: layout_modelsSlice,
layout_preferences: layout_preferencesSlice,
federated_learning_updates: federated_learning_updatesSlice,
ai_companion_sessions: ai_companion_sessionsSlice,
knowledge_graph_items: knowledge_graph_itemsSlice,
external_integrations: external_integrationsSlice,
tasks: tasksSlice,
courses: coursesSlice,
course_enrollments: course_enrollmentsSlice,
assignments: assignmentsSlice,
submissions: submissionsSlice,
quizzes: quizzesSlice,
quiz_results: quiz_resultsSlice,
marketplace_apps: marketplace_appsSlice,
app_installations: app_installationsSlice,
app_crash_reports: app_crash_reportsSlice,
audit_events: audit_eventsSlice,
data_subject_requests: data_subject_requestsSlice,
service_incidents: service_incidentsSlice,
deployment_changes: deployment_changesSlice,
feature_flags: feature_flagsSlice,
quality_reports: quality_reportsSlice,
event_streams: event_streamsSlice,
conference_events: conference_eventsSlice,
  },
})

// Infer the `RootState` and `AppDispatch` types from the store itself
export type RootState = ReturnType<typeof store.getState>
// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
export type AppDispatch = typeof store.dispatch
