import { makeAutoObservable } from 'mobx';

import { AppStore } from './AppStore';
import { AssetsStore } from './AssetsStore';
import { StorageStore } from './StorageStore';
import { EndpointStore } from './EndpointStore';
import { SensorStore } from './SensorStore';
import { IncidentsStore } from './IncidentsStore';
import { EventsJournalStore } from './EventsJournalStore';
import { DevicesStore } from './DevicesStore';
import { CorrelationRulesStore } from './CorrelationRulesStore';
import { CorrelationRulesGroupStore } from './CorrelationRulesGroupsStore';
import { NCIRCCStore } from './NCIRCCStore';
import { TagsStore } from './TagsStore';
import { AccountsStore } from './AccountsStore';
import { HelpersStore } from './HelpersStore';
import { RotationStore } from './RotationStore';
import { SettingsStore } from './SettingsStore';
import { AntivirusResultsTableStore } from './AntivirusResultsTableStore';
import { AssetsGroupsStore } from './AssetsGroupsStore';
import { AssetsManufacturersStore } from './AssetsManufacturersStore';
import { AssetsOsesStore } from './AssetsOsesStore';
import { IncidentsCategoriesStore } from './IncidentsCategoriesStore';
import { IncidentsEffectsStore } from './IncidentsEffectsStore';
import { IncidentsRecommendationsStore } from './IncidentsRecommendationsStore';
import { SystemInfoStore } from './SystemInfoStore';
import { FirewallStore } from './FirewallStore';
import { LicenseStore } from './LicenseStore';
import { AccountsStoreNew } from './AccountsStoreNew';
import { CurrentUserStore } from './CurrentUserStore';

/** import UI stores **/
import { AssetsUiStore } from 'pages/AssetsDashboard';
import { StorageUiStore } from 'pages/StorageDashboard/StorageUiStore';
import { IncidentsUiStore } from 'pages/IncidentsDashboard';
import { EventsJournalUiStore } from 'pages/EventsJournalDashboard';
import { DevicesUiStore } from 'pages/DevicesDashboard';
import { CorrelationRulesUiStore } from 'pages/CorrelationRulesDashboard/CorrelationRulesUiStore';
import { CorrelationRulesCheckerUiStore } from 'pages/CorrelationRulesDashboard/CorrelationRulesChecker/CorrelationRulesCheckerUiStore';
import { CorrelationRulesGroupsDashboardUiStore } from 'pages/CorrelationRulesGroupsDashboard';
import { NCIRCCUiStore } from 'pages/NCIRCCDashboard/NCIRCCUiStore';
import { RotationUiStore } from 'pages/RotationDashboard/RotationUiStore';
import { SettingsUiStore } from 'pages/SettingsDashboard/SettingsUiStore';
import { AntivirusResultTableUiStore } from 'pages/DevicesDashboard/DevicesCardInfo/AntivirusResultTable/AntivirusResultTableUiStore';
import { EndpointUiStore } from '../pages/DevicesDashboard/Stores/EnpointUiStore';
import { LicenseActivationPageStore } from 'pages/LicenseActivationPage';
import { AccountsDashboardUiStore } from 'pages/AccountsDashboard';

export class RootStore {
  readonly appStore: AppStore;

  readonly endpointStore: EndpointStore;

  readonly sensorStore: SensorStore;

  readonly firewallStore: FirewallStore;

  readonly assetsStore: AssetsStore;

  readonly devicesStore: DevicesStore;

  readonly storageStore: StorageStore;

  readonly eventsJournalStore: EventsJournalStore;

  readonly incidentsStore: IncidentsStore;

  readonly correlationRulesStore: CorrelationRulesStore;

  readonly correlationRulesGroupsStore: CorrelationRulesGroupStore;

  readonly ncirccStore: NCIRCCStore;

  readonly tagsStore: TagsStore;

  readonly accountsStore: AccountsStore;

  readonly rotationStore: RotationStore;

  readonly settingsStore: SettingsStore;

  readonly antivirusResultsTableStore: AntivirusResultsTableStore;

  readonly assetsGroupsStore: AssetsGroupsStore;

  readonly assetsManufacturersStore: AssetsManufacturersStore;

  readonly assetsOsesStore: AssetsOsesStore;

  readonly incidentsCategoriesStore: IncidentsCategoriesStore;

  readonly incidentsEffectsStore: IncidentsEffectsStore;

  readonly incidentsRecommendationsStore: IncidentsRecommendationsStore;

  readonly systemInfoStore: SystemInfoStore;

  readonly licenseStore: LicenseStore;

  readonly accountsStoreNew: AccountsStoreNew;

  readonly currentUserStore: CurrentUserStore;

  /** ui stores **/
  readonly assetsUiStore: AssetsUiStore;

  readonly devicesUiStore: DevicesUiStore;

  readonly endpointUiStore: EndpointUiStore;

  readonly storageUiStore: StorageUiStore;

  readonly incidentsUiStore: IncidentsUiStore;

  readonly eventsJournalUiStore: EventsJournalUiStore;

  readonly correlationRulesUiStore: CorrelationRulesUiStore;

  readonly correlationRulesCheckerUiStore: CorrelationRulesCheckerUiStore;

  readonly correlationRulesGroupsDashboardUiStore: CorrelationRulesGroupsDashboardUiStore;

  readonly ncirccUiStore: NCIRCCUiStore;

  readonly helpersStore: HelpersStore;

  readonly rotationUiStore: RotationUiStore;

  readonly settingsUiStore: SettingsUiStore;

  readonly antivirusResultTableUiStore: AntivirusResultTableUiStore;

  readonly licenseActivationPageStore: LicenseActivationPageStore;

  readonly accountsDashboardUiStore: AccountsDashboardUiStore;

  constructor() {
    this.appStore = new AppStore(this);
    this.accountsStore = new AccountsStore(this);
    this.assetsStore = new AssetsStore(this);
    this.assetsUiStore = new AssetsUiStore(this);
    this.incidentsStore = new IncidentsStore(this);
    this.incidentsUiStore = new IncidentsUiStore(this);
    this.devicesStore = new DevicesStore(this);
    this.devicesUiStore = new DevicesUiStore(this);
    this.endpointStore = new EndpointStore();
    this.endpointUiStore = new EndpointUiStore(this);
    this.firewallStore = new FirewallStore();
    this.sensorStore = new SensorStore();
    this.storageStore = new StorageStore(this);
    this.storageUiStore = new StorageUiStore(this);
    this.eventsJournalStore = new EventsJournalStore(this);
    this.eventsJournalUiStore = new EventsJournalUiStore(this);
    this.correlationRulesStore = new CorrelationRulesStore();
    this.correlationRulesUiStore = new CorrelationRulesUiStore();
    this.correlationRulesCheckerUiStore = new CorrelationRulesCheckerUiStore(
      this,
    );
    this.correlationRulesGroupsDashboardUiStore =
      new CorrelationRulesGroupsDashboardUiStore();
    this.correlationRulesGroupsStore = new CorrelationRulesGroupStore();
    this.assetsGroupsStore = new AssetsGroupsStore();
    this.assetsManufacturersStore = new AssetsManufacturersStore();
    this.assetsOsesStore = new AssetsOsesStore();
    this.incidentsCategoriesStore = new IncidentsCategoriesStore();
    this.incidentsEffectsStore = new IncidentsEffectsStore();
    this.incidentsRecommendationsStore = new IncidentsRecommendationsStore();
    this.systemInfoStore = new SystemInfoStore();
    this.ncirccStore = new NCIRCCStore(this);
    this.ncirccUiStore = new NCIRCCUiStore(this);
    this.helpersStore = new HelpersStore(this);
    this.tagsStore = new TagsStore(this);
    this.rotationStore = new RotationStore(this);
    this.rotationUiStore = new RotationUiStore(this);
    this.settingsStore = new SettingsStore(this);
    this.settingsUiStore = new SettingsUiStore(this);
    this.antivirusResultTableUiStore = new AntivirusResultTableUiStore(this);
    this.antivirusResultsTableStore = new AntivirusResultsTableStore(this);
    this.licenseStore = new LicenseStore();
    this.licenseActivationPageStore = new LicenseActivationPageStore();
    this.accountsStoreNew = new AccountsStoreNew();
    this.accountsDashboardUiStore = new AccountsDashboardUiStore();
    this.currentUserStore = new CurrentUserStore();
    this.sensorStore = new SensorStore();

    makeAutoObservable(this);
  }
}

export const rootStore = new RootStore();
