import { Selector, createSelector } from '@ngrx/store'; export interface State { selectedRoom: string | null; selectedMassDetail: number | null; massDetailProcessing: boolean; selectedRightDrawer: string | null; } export const initialState: State = { selectedRoom: null, selectedMassDetail: null, massDetailProcessing: false, selectedRightDrawer: '' }; export function selectors(selector: Selector) { return { selectedRoom: createSelector( selector, (state: State) => state.selectedRoom ), selectedMassDetail: createSelector( selector, (state: State) => state.selectedMassDetail ), selectedRightDrawer: createSelector( selector, (state: State) => state.selectedRightDrawer ) }; }