import { createFeatureSelector , createSelector } from '@ngrx/store' ; import { RESPONSIVE_FEATURE_KEY , ResponsiveState } from './responsive.reducer' ; const getResponsiveState = createFeatureSelector < ResponsiveState > ( RESPONSIVE_FEATURE_KEY ) ; const getHeight = createSelector ( getResponsiveState , ( state ) => state . height ) ; const getInitError = createSelector ( getResponsiveState , ( state ) => state . initError ) ; const getInitialized = createSelector ( getResponsiveState , ( state ) => state . initialized ) ; const getInitiating = createSelector ( getResponsiveState , ( state ) => state . initiating ) ; const getMobile = createSelector ( getResponsiveState , ( state ) => state . mobile ) ; const getProperties = createSelector ( getResponsiveState , ( state ) => ( { height : state . height , mobile : state . mobile , width : state . width } ) ) ; const getResponsiveType = createSelector ( getResponsiveState , ( state ) => state . responsiveType ) ; const getWidth = createSelector ( getResponsiveState , ( state ) => state . width ) ; export const responsiveQuery = { getHeight , getInitError , getInitialized , getInitiating , getMobile , getProperties , getResponsiveType , getWidth } ;