import { createFeatureSelector , createSelector } from '@ngrx/store' ; import { LAYOUT_FEATURE_KEY , LayoutState } from './layout.reducer' ; const getLayoutState = createFeatureSelector < LayoutState > ( LAYOUT_FEATURE_KEY ) ; export const getMenu = createSelector ( getLayoutState , ( state ) => state . menu ) ; export const getHoveredNavItemByLevel = createSelector ( getLayoutState , ( state , props ) => state . menu . hovered [ props . level ] ) ; export const getOpenedSidebar = createSelector ( getLayoutState , ( state ) => state . openedSidebar ) ; export const getShowedSubmenu = createSelector ( getLayoutState , ( state ) => state . menu . showedSubmenu ) ; export const getBreadcrumbs = createSelector ( getLayoutState , ( state ) => state . breadcrumbs ) ; export const layoutQuery = { getMenu , getHoveredNavItemByLevel , getOpenedSidebar , getShowedSubmenu , getBreadcrumbs } ;