import { createSelector, createFeatureSelector, } from '@ngrx/store'; import { StateSelector } from '@overflow/core/ngrx/store'; import { MODULE } from '../member.constant'; import * as AuthStore from './auth'; import * as SignupStore from './signup'; import * as TotpStore from './totp'; import * as ModifyStore from './modify'; import * as ResetPasswordStore from './reset-password'; export interface State { auth: AuthStore.State; signup: SignupStore.State; totp: TotpStore.State; modify: ModifyStore.State; resetPassword: ResetPasswordStore.State; } export const REDUCERS = { auth: AuthStore.reducer, signup: SignupStore.reducer, totp: TotpStore.reducer, modify: ModifyStore.reducer, resetPassword: ResetPasswordStore.reducer, }; export const EFFECTS = [ AuthStore.Effects, SignupStore.Effects, TotpStore.Effects, ModifyStore.Effects, ResetPasswordStore.Effects, ]; export const selectMemberState = createFeatureSelector(MODULE.name); export const AuthSelector = new StateSelector(createSelector( selectMemberState, (state: State) => state.auth )); export const SignupSelector = new StateSelector(createSelector( selectMemberState, (state: State) => state.signup )); export const TotpSelector = new StateSelector(createSelector( selectMemberState, (state: State) => state.totp )); export const ModifySelector = new StateSelector(createSelector( selectMemberState, (state: State) => state.modify )); export const ResetPasswordSelector = new StateSelector(createSelector( selectMemberState, (state: State) => state.resetPassword ));