import { ImageryStatusActionTypes } from '../actions/imagery-status.actions' ; import { createFeatureSelector , createSelector , MemoizedSelector } from '@ngrx/store' ; export const imageryStatusFeatureKey = 'imageryStatus' ; export const imageryStatusStateSelector = createFeatureSelector < IImageryStatusState > ( imageryStatusFeatureKey ) ; export interface IImageryStatusState { enableCopyOriginalOverlayData : boolean ; } export const imageryStatusInitialState = { enableCopyOriginalOverlayData : false , } ; export function ImageryStatusReducer ( state = imageryStatusInitialState , action ) { switch ( action . type ) { case ImageryStatusActionTypes . ENABLE_COPY_ORIGINAL_OVERLAY_DATA : return { ... state , enableCopyOriginalOverlayData : action . payload } ; default : return state ; } } export const selectEnableCopyOriginalOverlayDataFlag = createSelector ( imageryStatusStateSelector , ( imageryStatus ) => imageryStatus . enableCopyOriginalOverlayData ) ;