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 campusesSlice from "./campuses/campusesSlice";
import camp_sessionsSlice from "./camp_sessions/camp_sessionsSlice";
import age_groupsSlice from "./age_groups/age_groupsSlice";
import weekly_themesSlice from "./weekly_themes/weekly_themesSlice";
import pricing_plansSlice from "./pricing_plans/pricing_plansSlice";
import fee_rulesSlice from "./fee_rules/fee_rulesSlice";
import guardiansSlice from "./guardians/guardiansSlice";
import campersSlice from "./campers/campersSlice";
import enrollmentsSlice from "./enrollments/enrollmentsSlice";
import paymentsSlice from "./payments/paymentsSlice";
import waiver_documentsSlice from "./waiver_documents/waiver_documentsSlice";
import document_signaturesSlice from "./document_signatures/document_signaturesSlice";
import field_trip_catalogSlice from "./field_trip_catalog/field_trip_catalogSlice";
import field_trip_eventsSlice from "./field_trip_events/field_trip_eventsSlice";
import trip_registrationsSlice from "./trip_registrations/trip_registrationsSlice";
import special_tripsSlice from "./special_trips/special_tripsSlice";
import end_of_summer_trip_optionsSlice from "./end_of_summer_trip_options/end_of_summer_trip_optionsSlice";
import end_of_summer_trip_selectionsSlice from "./end_of_summer_trip_selections/end_of_summer_trip_selectionsSlice";
import activity_blocksSlice from "./activity_blocks/activity_blocksSlice";
import curriculum_subjectsSlice from "./curriculum_subjects/curriculum_subjectsSlice";
import staff_assignmentsSlice from "./staff_assignments/staff_assignmentsSlice";
import announcementsSlice from "./announcements/announcementsSlice";

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

users: usersSlice,
roles: rolesSlice,
permissions: permissionsSlice,
campuses: campusesSlice,
camp_sessions: camp_sessionsSlice,
age_groups: age_groupsSlice,
weekly_themes: weekly_themesSlice,
pricing_plans: pricing_plansSlice,
fee_rules: fee_rulesSlice,
guardians: guardiansSlice,
campers: campersSlice,
enrollments: enrollmentsSlice,
payments: paymentsSlice,
waiver_documents: waiver_documentsSlice,
document_signatures: document_signaturesSlice,
field_trip_catalog: field_trip_catalogSlice,
field_trip_events: field_trip_eventsSlice,
trip_registrations: trip_registrationsSlice,
special_trips: special_tripsSlice,
end_of_summer_trip_options: end_of_summer_trip_optionsSlice,
end_of_summer_trip_selections: end_of_summer_trip_selectionsSlice,
activity_blocks: activity_blocksSlice,
curriculum_subjects: curriculum_subjectsSlice,
staff_assignments: staff_assignmentsSlice,
announcements: announcementsSlice,
  },
})

// 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
