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 user_physical_baselinesSlice from "./user_physical_baselines/user_physical_baselinesSlice";
import user_lifestyle_baselinesSlice from "./user_lifestyle_baselines/user_lifestyle_baselinesSlice";
import goalsSlice from "./goals/goalsSlice";
import conditionsSlice from "./conditions/conditionsSlice";
import surgeriesSlice from "./surgeries/surgeriesSlice";
import implants_devicesSlice from "./implants_devices/implants_devicesSlice";
import allergiesSlice from "./allergies/allergiesSlice";
import family_historiesSlice from "./family_histories/family_historiesSlice";
import healthcare_providersSlice from "./healthcare_providers/healthcare_providersSlice";
import pharmaciesSlice from "./pharmacies/pharmaciesSlice";
import medicationsSlice from "./medications/medicationsSlice";
import medication_dosesSlice from "./medication_doses/medication_dosesSlice";
import medication_side_effectsSlice from "./medication_side_effects/medication_side_effectsSlice";
import supplementsSlice from "./supplements/supplementsSlice";
import supplement_evidence_itemsSlice from "./supplement_evidence_items/supplement_evidence_itemsSlice";
import workoutsSlice from "./workouts/workoutsSlice";
import exercisesSlice from "./exercises/exercisesSlice";
import workout_exercisesSlice from "./workout_exercises/workout_exercisesSlice";
import workout_schedulesSlice from "./workout_schedules/workout_schedulesSlice";
import training_blocksSlice from "./training_blocks/training_blocksSlice";
import workout_sessionsSlice from "./workout_sessions/workout_sessionsSlice";
import strength_setsSlice from "./strength_sets/strength_setsSlice";
import cardio_sessionsSlice from "./cardio_sessions/cardio_sessionsSlice";
import recovery_logsSlice from "./recovery_logs/recovery_logsSlice";
import heat_cold_exposuresSlice from "./heat_cold_exposures/heat_cold_exposuresSlice";
import flexibility_assessmentsSlice from "./flexibility_assessments/flexibility_assessmentsSlice";
import foodsSlice from "./foods/foodsSlice";
import recipesSlice from "./recipes/recipesSlice";
import recipe_collectionsSlice from "./recipe_collections/recipe_collectionsSlice";
import mealsSlice from "./meals/mealsSlice";
import meal_itemsSlice from "./meal_items/meal_itemsSlice";
import nutrition_targetsSlice from "./nutrition_targets/nutrition_targetsSlice";
import meal_plansSlice from "./meal_plans/meal_plansSlice";
import meal_plan_itemsSlice from "./meal_plan_items/meal_plan_itemsSlice";
import grocery_listsSlice from "./grocery_lists/grocery_listsSlice";
import grocery_itemsSlice from "./grocery_items/grocery_itemsSlice";
import hydration_logsSlice from "./hydration_logs/hydration_logsSlice";
import fasting_sessionsSlice from "./fasting_sessions/fasting_sessionsSlice";
import ketone_glucose_logsSlice from "./ketone_glucose_logs/ketone_glucose_logsSlice";
import bowel_movementsSlice from "./bowel_movements/bowel_movementsSlice";
import gut_symptom_logsSlice from "./gut_symptom_logs/gut_symptom_logsSlice";
import health_metricsSlice from "./health_metrics/health_metricsSlice";
import symptom_logsSlice from "./symptom_logs/symptom_logsSlice";
import medical_appointmentsSlice from "./medical_appointments/medical_appointmentsSlice";
import lab_documentsSlice from "./lab_documents/lab_documentsSlice";
import vaccinationsSlice from "./vaccinations/vaccinationsSlice";
import ai_chat_threadsSlice from "./ai_chat_threads/ai_chat_threadsSlice";
import ai_chat_messagesSlice from "./ai_chat_messages/ai_chat_messagesSlice";
import ai_generationsSlice from "./ai_generations/ai_generationsSlice";
import habitsSlice from "./habits/habitsSlice";
import habit_logsSlice from "./habit_logs/habit_logsSlice";
import habit_challengesSlice from "./habit_challenges/habit_challengesSlice";
import library_articlesSlice from "./library_articles/library_articlesSlice";
import saved_articlesSlice from "./saved_articles/saved_articlesSlice";
import glossary_termsSlice from "./glossary_terms/glossary_termsSlice";
import health_vault_documentsSlice from "./health_vault_documents/health_vault_documentsSlice";
import emergency_medical_cardsSlice from "./emergency_medical_cards/emergency_medical_cardsSlice";
import advance_directivesSlice from "./advance_directives/advance_directivesSlice";
import insurance_policiesSlice from "./insurance_policies/insurance_policiesSlice";
import family_groupsSlice from "./family_groups/family_groupsSlice";
import family_membersSlice from "./family_members/family_membersSlice";
import sharing_permissionsSlice from "./sharing_permissions/sharing_permissionsSlice";
import mood_logsSlice from "./mood_logs/mood_logsSlice";
import mental_assessmentsSlice from "./mental_assessments/mental_assessmentsSlice";
import journal_entriesSlice from "./journal_entries/journal_entriesSlice";
import breathing_sessionsSlice from "./breathing_sessions/breathing_sessionsSlice";
import stress_logsSlice from "./stress_logs/stress_logsSlice";
import cognitive_testsSlice from "./cognitive_tests/cognitive_testsSlice";
import sleep_logsSlice from "./sleep_logs/sleep_logsSlice";
import sleep_environment_logsSlice from "./sleep_environment_logs/sleep_environment_logsSlice";
import nap_logsSlice from "./nap_logs/nap_logsSlice";
import menstrual_cyclesSlice from "./menstrual_cycles/menstrual_cyclesSlice";
import menstrual_day_logsSlice from "./menstrual_day_logs/menstrual_day_logsSlice";
import fertility_logsSlice from "./fertility_logs/fertility_logsSlice";
import pregnanciesSlice from "./pregnancies/pregnanciesSlice";
import pregnancy_symptom_logsSlice from "./pregnancy_symptom_logs/pregnancy_symptom_logsSlice";
import breastfeeding_logsSlice from "./breastfeeding_logs/breastfeeding_logsSlice";
import formula_feeding_logsSlice from "./formula_feeding_logs/formula_feeding_logsSlice";
import baby_metricsSlice from "./baby_metrics/baby_metricsSlice";
import epds_assessmentsSlice from "./epds_assessments/epds_assessmentsSlice";
import kick_countsSlice from "./kick_counts/kick_countsSlice";
import contraction_sessionsSlice from "./contraction_sessions/contraction_sessionsSlice";
import contractionsSlice from "./contractions/contractionsSlice";
import menopause_symptom_logsSlice from "./menopause_symptom_logs/menopause_symptom_logsSlice";
import male_reproductive_logsSlice from "./male_reproductive_logs/male_reproductive_logsSlice";
import semen_analysesSlice from "./semen_analyses/semen_analysesSlice";
import sti_testsSlice from "./sti_tests/sti_testsSlice";
import contraception_logsSlice from "./contraception_logs/contraception_logsSlice";
import libido_logsSlice from "./libido_logs/libido_logsSlice";
import sexual_activity_logsSlice from "./sexual_activity_logs/sexual_activity_logsSlice";
import skin_care_logsSlice from "./skin_care_logs/skin_care_logsSlice";
import sun_exposure_logsSlice from "./sun_exposure_logs/sun_exposure_logsSlice";
import mole_lesion_logsSlice from "./mole_lesion_logs/mole_lesion_logsSlice";
import oral_hygiene_logsSlice from "./oral_hygiene_logs/oral_hygiene_logsSlice";
import dental_recordsSlice from "./dental_records/dental_recordsSlice";
import dental_symptomsSlice from "./dental_symptoms/dental_symptomsSlice";
import vision_prescriptionsSlice from "./vision_prescriptions/vision_prescriptionsSlice";
import eye_symptom_logsSlice from "./eye_symptom_logs/eye_symptom_logsSlice";
import hearing_test_logsSlice from "./hearing_test_logs/hearing_test_logsSlice";
import tinnitus_logsSlice from "./tinnitus_logs/tinnitus_logsSlice";
import noise_exposure_logsSlice from "./noise_exposure_logs/noise_exposure_logsSlice";
import pain_logsSlice from "./pain_logs/pain_logsSlice";
import injuriesSlice from "./injuries/injuriesSlice";
import physio_exercisesSlice from "./physio_exercises/physio_exercisesSlice";
import ergonomics_logsSlice from "./ergonomics_logs/ergonomics_logsSlice";
import notificationsSlice from "./notifications/notificationsSlice";
import export_jobsSlice from "./export_jobs/export_jobsSlice";
import app_settingsSlice from "./app_settings/app_settingsSlice";

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

users: usersSlice,
roles: rolesSlice,
permissions: permissionsSlice,
user_physical_baselines: user_physical_baselinesSlice,
user_lifestyle_baselines: user_lifestyle_baselinesSlice,
goals: goalsSlice,
conditions: conditionsSlice,
surgeries: surgeriesSlice,
implants_devices: implants_devicesSlice,
allergies: allergiesSlice,
family_histories: family_historiesSlice,
healthcare_providers: healthcare_providersSlice,
pharmacies: pharmaciesSlice,
medications: medicationsSlice,
medication_doses: medication_dosesSlice,
medication_side_effects: medication_side_effectsSlice,
supplements: supplementsSlice,
supplement_evidence_items: supplement_evidence_itemsSlice,
workouts: workoutsSlice,
exercises: exercisesSlice,
workout_exercises: workout_exercisesSlice,
workout_schedules: workout_schedulesSlice,
training_blocks: training_blocksSlice,
workout_sessions: workout_sessionsSlice,
strength_sets: strength_setsSlice,
cardio_sessions: cardio_sessionsSlice,
recovery_logs: recovery_logsSlice,
heat_cold_exposures: heat_cold_exposuresSlice,
flexibility_assessments: flexibility_assessmentsSlice,
foods: foodsSlice,
recipes: recipesSlice,
recipe_collections: recipe_collectionsSlice,
meals: mealsSlice,
meal_items: meal_itemsSlice,
nutrition_targets: nutrition_targetsSlice,
meal_plans: meal_plansSlice,
meal_plan_items: meal_plan_itemsSlice,
grocery_lists: grocery_listsSlice,
grocery_items: grocery_itemsSlice,
hydration_logs: hydration_logsSlice,
fasting_sessions: fasting_sessionsSlice,
ketone_glucose_logs: ketone_glucose_logsSlice,
bowel_movements: bowel_movementsSlice,
gut_symptom_logs: gut_symptom_logsSlice,
health_metrics: health_metricsSlice,
symptom_logs: symptom_logsSlice,
medical_appointments: medical_appointmentsSlice,
lab_documents: lab_documentsSlice,
vaccinations: vaccinationsSlice,
ai_chat_threads: ai_chat_threadsSlice,
ai_chat_messages: ai_chat_messagesSlice,
ai_generations: ai_generationsSlice,
habits: habitsSlice,
habit_logs: habit_logsSlice,
habit_challenges: habit_challengesSlice,
library_articles: library_articlesSlice,
saved_articles: saved_articlesSlice,
glossary_terms: glossary_termsSlice,
health_vault_documents: health_vault_documentsSlice,
emergency_medical_cards: emergency_medical_cardsSlice,
advance_directives: advance_directivesSlice,
insurance_policies: insurance_policiesSlice,
family_groups: family_groupsSlice,
family_members: family_membersSlice,
sharing_permissions: sharing_permissionsSlice,
mood_logs: mood_logsSlice,
mental_assessments: mental_assessmentsSlice,
journal_entries: journal_entriesSlice,
breathing_sessions: breathing_sessionsSlice,
stress_logs: stress_logsSlice,
cognitive_tests: cognitive_testsSlice,
sleep_logs: sleep_logsSlice,
sleep_environment_logs: sleep_environment_logsSlice,
nap_logs: nap_logsSlice,
menstrual_cycles: menstrual_cyclesSlice,
menstrual_day_logs: menstrual_day_logsSlice,
fertility_logs: fertility_logsSlice,
pregnancies: pregnanciesSlice,
pregnancy_symptom_logs: pregnancy_symptom_logsSlice,
breastfeeding_logs: breastfeeding_logsSlice,
formula_feeding_logs: formula_feeding_logsSlice,
baby_metrics: baby_metricsSlice,
epds_assessments: epds_assessmentsSlice,
kick_counts: kick_countsSlice,
contraction_sessions: contraction_sessionsSlice,
contractions: contractionsSlice,
menopause_symptom_logs: menopause_symptom_logsSlice,
male_reproductive_logs: male_reproductive_logsSlice,
semen_analyses: semen_analysesSlice,
sti_tests: sti_testsSlice,
contraception_logs: contraception_logsSlice,
libido_logs: libido_logsSlice,
sexual_activity_logs: sexual_activity_logsSlice,
skin_care_logs: skin_care_logsSlice,
sun_exposure_logs: sun_exposure_logsSlice,
mole_lesion_logs: mole_lesion_logsSlice,
oral_hygiene_logs: oral_hygiene_logsSlice,
dental_records: dental_recordsSlice,
dental_symptoms: dental_symptomsSlice,
vision_prescriptions: vision_prescriptionsSlice,
eye_symptom_logs: eye_symptom_logsSlice,
hearing_test_logs: hearing_test_logsSlice,
tinnitus_logs: tinnitus_logsSlice,
noise_exposure_logs: noise_exposure_logsSlice,
pain_logs: pain_logsSlice,
injuries: injuriesSlice,
physio_exercises: physio_exercisesSlice,
ergonomics_logs: ergonomics_logsSlice,
notifications: notificationsSlice,
export_jobs: export_jobsSlice,
app_settings: app_settingsSlice,
  },
})

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