import { createFeatureSelector , createSelector } from '@ngrx/store' ; import { TRANSLATION_FEATURE_KEY , TranslationState } from './translation.reducer' ; const getTranslationState = createFeatureSelector < TranslationState > ( TRANSLATION_FEATURE_KEY ) ; const getCurrentLanguage = createSelector ( getTranslationState , ( state ) => state . currentLanguage ) ; const getInitialized = createSelector ( getTranslationState , ( state ) => state . initialized ) ; const getInitError = createSelector ( getTranslationState , ( state ) => state . initError ) ; const getInitiating = createSelector ( getTranslationState , ( state ) => state . initiating ) ; const getLanguage = createSelector ( getTranslationState , ( state ) => state . language ) ; const getLanguages = createSelector ( getTranslationState , ( state ) => state . languages ) ; const getSetError = createSelector ( getTranslationState , ( state ) => state . setError ) ; const getSetting = createSelector ( getTranslationState , ( state ) => state . setting ) ; export const translationQuery = { getCurrentLanguage , getInitialized , getInitError , getInitiating , getLanguage , getLanguages , getSetError , getSetting } ;