import { LoadingState } from '../loading/reducer'; import { FeaturesState } from './reducer'; import { ApplicationName, ApplicationFeatures, StateWithFeatures } from './types'; export declare const getState: (state: StateWithFeatures) => FeaturesState; export declare const getData: (state: StateWithFeatures) => Record; export declare const getLoading: (state: StateWithFeatures) => LoadingState; export declare const getError: (state: StateWithFeatures) => string | null; /** * Helper to get whether a feature flag is enabled or disabled. * It will first look into your env file for the feature flag, if it is not defined there, * it will look it in the requested and stored features data. * The env key will be determined from the application and the flag. For example, if the * application is "explorer" and the flag is "some-crazy-feature", it will look * for it as REACT_APP_FF_EXPLORER_SOME_CRAZY_FEATURE. * * @param state Redux state of the application. * @param app Appplication name. * @param feature Feature key without the application name prefix. For example for the "builder-feature". * You need to provide only "feature" * * @returns Whether the feature is enabled or not. */ export declare const getIsFeatureEnabled: (state: StateWithFeatures, app: ApplicationName, feature: string) => boolean; export declare const isLoadingFeatureFlags: (state: StateWithFeatures) => boolean; export declare const hasLoadedInitialFlags: (state: StateWithFeatures) => boolean;