import { createSelector , createFeatureSelector , MemoizedSelector , } from '@ngrx/store' ; import { DaffAddress } from '@daffodil/core' ; import { DaffShippingReducersState } from '../reducers/shipping-reducers.interface' ; import { DaffShippingReducerState } from '../reducers/shipping/shipping-reducer.interface' ; /**
 * Shipping Feature State
 */ export const selectShippingFeatureState = createFeatureSelector < DaffShippingReducersState > ( 'shipping' ) ; /**
 * Shipping State
 */ export const selectShippingState = createSelector ( selectShippingFeatureState , ( state ) => state . shipping ) ; export const selectShippingAddress = createSelector ( selectShippingState , ( state ) => state . shippingAddress ) ; export const selectShippingOptionId = createSelector ( selectShippingState , ( state ) => state . selectedShippingOptionId ) ; export const selectIsShippingAddressValid = createSelector ( selectShippingAddress , ( state ) => ! ! state ) ;