src/applications/_mock-form-ae-design-patterns/utils/selectors/feature-toggles.js
import { createSelector } from 'reselect';
import { toggleValues } from '@department-of-veterans-affairs/platform-site-wide/selectors';
import FEATURE_FLAG_NAMES from '@department-of-veterans-affairs/platform-utilities/featureFlagNames';
const selectFeatureToggles = createSelector(
state => ({
isLoadingFeatureFlags: state?.featureToggles?.loading,
isBrowserMonitoringEnabled: toggleValues(state)[
FEATURE_FLAG_NAMES.hcaBrowserMonitoringEnabled
],
isTeraEnabled: toggleValues(state)[FEATURE_FLAG_NAMES.ezrTeraEnabled],
isUploadEnabled: toggleValues(state)[FEATURE_FLAG_NAMES.ezrUploadEnabled],
}),
toggles => toggles,
);
const makeSelectFeatureToggles = () => selectFeatureToggles;
export { makeSelectFeatureToggles };