import {
  createSelector,
  createFeatureSelector,
} from '@ngrx/store';

import { MODULE } from '../meta.constant';

import * as MetaCrawlerEntityStore from './entity/meta-crawler';
import * as MetaCrawlerInputItemEntityStore from './entity/meta-crawler-input-item';
import * as MetaHistoryTypeEntityStore from './entity/meta-history-type';
import * as MetaInfraTypeEntityStore from './entity/meta-infra-type';
import * as MetaInfraVendorEntityStore from './entity/meta-infra-vendor';
import * as MetaInputTypeEntityStore from './entity/meta-input-type';
import * as MetaMemberStatusEntityStore from './entity/meta-member-status';
import * as MetaNoAuthProbeStatusEntityStore from './entity/meta-noauth-probe-status';
import * as MetaProbeArchitectureEntityStore from './entity/meta-probe-architecture';
import * as MetaProbeOsEntityStore from './entity/meta-probe-os';
import * as MetaProbePackageEntityStore from './entity/meta-probe-package';
import * as MetaProbeStatusEntityStore from './entity/meta-probe-status';
import * as MetaProbeTaskTypeEntityStore from './entity/meta-probe-task-type';
import * as MetaProbeVersionEntityStore from './entity/meta-probe-version';
import * as MetaSensorDisplayItemEntityStore from './entity/meta-sensor-display-item';
import * as MetaSensorDisplayMappingEntityStore from './entity/meta-sensor-display-mapping';
import * as MetaSensorItemEntityStore from './entity/meta-sensor-item';
import * as MetaSensorItemKeyEntityStore from './entity/meta-sensor-item-key';
import * as MetaSensorItemTypeEntityStore from './entity/meta-sensor-item-type';
import * as MetaSensorItemUnitEntityStore from './entity/meta-sensor-item-unit';
import * as MetaSensorStatusEntityStore from './entity/meta-sensor-status';
import * as MetaVendorCrawlerEntityStore from './entity/meta-vendor-crawler';
import * as MetaVendorCrawlerSensorItemEntityStore from './entity/meta-vendor-crawler-sensor-item';

export interface State {
  meta_crawler_entity: MetaCrawlerEntityStore.State;
  meta_crawler_input_item_entity: MetaCrawlerInputItemEntityStore.State;
  meta_history_type_entity: MetaHistoryTypeEntityStore.State;
  meta_infra_type_entity: MetaInfraTypeEntityStore.State;
  meta_infra_vendor_entity: MetaInfraVendorEntityStore.State;
  meta_input_type_entity: MetaInputTypeEntityStore.State;
  meta_member_status_entity: MetaMemberStatusEntityStore.State;
  meta_noauth_probe_status_entity: MetaNoAuthProbeStatusEntityStore.State;
  meta_probe_architecture_entity: MetaProbeArchitectureEntityStore.State;
  meta_probe_os_entity: MetaProbeOsEntityStore.State;
  meta_probe_package_entity: MetaProbePackageEntityStore.State;
  meta_probe_status_entity: MetaProbeStatusEntityStore.State;
  meta_probe_task_type_entity: MetaProbeTaskTypeEntityStore.State;
  meta_probe_version_entity: MetaProbeVersionEntityStore.State;
  meta_sensor_display_item_entity: MetaSensorDisplayItemEntityStore.State;
  meta_sensor_display_mapping_entity: MetaSensorDisplayMappingEntityStore.State;
  meta_sensor_item_entity: MetaSensorItemEntityStore.State;
  meta_sensor_item_key_entity: MetaSensorItemKeyEntityStore.State;
  meta_sensor_item_type_entity: MetaSensorItemTypeEntityStore.State;
  meta_sensor_item_unit_entity: MetaSensorItemUnitEntityStore.State;
  meta_sensor_status_entity: MetaSensorStatusEntityStore.State;
  meta_vendor_crawler_entity: MetaVendorCrawlerEntityStore.State;
  meta_vendor_crawler_sensor_item_entity: MetaVendorCrawlerSensorItemEntityStore.State;
}

export const REDUCERS = {
  meta_crawler_entity: MetaCrawlerEntityStore.reducer,
  meta_crawler_input_item_entity: MetaCrawlerInputItemEntityStore.reducer,
  meta_history_type_entity: MetaHistoryTypeEntityStore.reducer,
  meta_infra_type_entity: MetaInfraTypeEntityStore.reducer,
  meta_infra_vendor_entity: MetaInfraVendorEntityStore.reducer,
  meta_input_type_entity: MetaInputTypeEntityStore.reducer,
  meta_member_status_entity: MetaMemberStatusEntityStore.reducer,
  meta_noauth_probe_status_entity: MetaNoAuthProbeStatusEntityStore.reducer,
  meta_probe_architecture_entity: MetaProbeArchitectureEntityStore.reducer,
  meta_probe_os_entity: MetaProbeOsEntityStore.reducer,
  meta_probe_package_entity: MetaProbePackageEntityStore.reducer,
  meta_probe_status_entity: MetaProbeStatusEntityStore.reducer,
  meta_probe_task_type_entity: MetaProbeTaskTypeEntityStore.reducer,
  meta_probe_version_entity: MetaProbeVersionEntityStore.reducer,
  meta_sensor_display_item_entity: MetaSensorDisplayItemEntityStore.reducer,
  meta_sensor_display_mapping_entity: MetaSensorDisplayMappingEntityStore.reducer,
  meta_sensor_item_entity: MetaSensorItemEntityStore.reducer,
  meta_sensor_item_key_entity: MetaSensorItemKeyEntityStore.reducer,
  meta_sensor_item_type_entity: MetaSensorItemTypeEntityStore.reducer,
  meta_sensor_item_unit_entity: MetaSensorItemUnitEntityStore.reducer,
  meta_sensor_status_entity: MetaSensorStatusEntityStore.reducer,
  meta_vendor_crawler_entity: MetaVendorCrawlerEntityStore.reducer,
  meta_vendor_crawler_sensor_item_entity: MetaVendorCrawlerSensorItemEntityStore.reducer,
};

export const EFFECTS = [
  MetaCrawlerEntityStore.Effects,
  MetaCrawlerInputItemEntityStore.Effects,
  MetaHistoryTypeEntityStore.Effects,
  MetaInfraTypeEntityStore.Effects,
  MetaInfraVendorEntityStore.Effects,
  MetaInputTypeEntityStore.Effects,
  MetaMemberStatusEntityStore.Effects,
  MetaNoAuthProbeStatusEntityStore.Effects,
  MetaProbeArchitectureEntityStore.Effects,
  MetaProbeOsEntityStore.Effects,
  MetaProbePackageEntityStore.Effects,
  MetaProbeStatusEntityStore.Effects,
  MetaProbeTaskTypeEntityStore.Effects,
  MetaProbeVersionEntityStore.Effects,
  MetaSensorDisplayItemEntityStore.Effects,
  MetaSensorDisplayMappingEntityStore.Effects,
  MetaSensorItemEntityStore.Effects,
  MetaSensorItemKeyEntityStore.Effects,
  MetaSensorItemTypeEntityStore.Effects,
  MetaSensorItemUnitEntityStore.Effects,
  MetaSensorStatusEntityStore.Effects,
  MetaVendorCrawlerEntityStore.Effects,
  MetaVendorCrawlerSensorItemEntityStore.Effects,
];

export const selectState = createFeatureSelector<State>(MODULE.name);



export const MetaCrawlerEntitySelector = MetaCrawlerEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_crawler_entity
));
export const MetaCrawlerInputItemEntitySelector = MetaCrawlerInputItemEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_crawler_input_item_entity
));
export const MetaHistoryTypeEntitySelector = MetaHistoryTypeEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_history_type_entity
));
export const MetaInfraTypeEntitySelector = MetaInfraTypeEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_infra_type_entity
));
export const MetaInfraVendorEntitySelector = MetaInfraVendorEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_infra_vendor_entity
));
export const MetaInputTypeEntitySelector = MetaInputTypeEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_input_type_entity
));
export const MetaMemberStatusEntitySelector = MetaMemberStatusEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_member_status_entity
));
export const MetaNoAuthProbeStatusEntitySelector = MetaNoAuthProbeStatusEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_noauth_probe_status_entity
));
export const MetaProbeArchitectureEntitySelector = MetaProbeArchitectureEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_probe_architecture_entity
));
export const MetaProbeOsEntitySelector = MetaProbeOsEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_probe_os_entity
));
export const MetaProbePackageEntitySelector = MetaProbePackageEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_probe_package_entity
));
export const MetaProbeStatusEntitySelector = MetaProbeStatusEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_probe_status_entity
));
export const MetaProbeTaskTypeEntitySelector = MetaProbeTaskTypeEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_probe_task_type_entity
));
export const MetaProbeVersionEntitySelector = MetaProbeVersionEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_probe_version_entity
));
export const MetaSensorDisplayItemEntitySelector = MetaSensorDisplayItemEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_sensor_display_item_entity
));
export const MetaSensorDisplayMappingEntitySelector = MetaSensorDisplayMappingEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_sensor_display_mapping_entity
));
export const MetaSensorItemEntitySelector = MetaSensorItemEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_sensor_item_entity
));
export const MetaSensorItemKeyEntitySelector = MetaSensorItemKeyEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_sensor_item_key_entity
));
export const MetaSensorItemTypeEntitySelector = MetaSensorItemTypeEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_sensor_item_type_entity
));
export const MetaSensorItemUnitEntitySelector = MetaSensorItemUnitEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_sensor_item_unit_entity
));
export const MetaSensorStatusEntitySelector = MetaSensorStatusEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_sensor_status_entity
));
export const MetaVendorCrawlerEntitySelector = MetaVendorCrawlerEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_vendor_crawler_entity
));
export const MetaVendorCrawlerSensorItemEntitySelector = MetaVendorCrawlerSensorItemEntityStore.getSelectors(createSelector(
  selectState, (state: State) => state.meta_vendor_crawler_sensor_item_entity
));


