import { LoadingState } from '../loading/reducer'; import { FeaturesState } from './reducer'; import { ApplicationFeatures, ApplicationName, StateWithFeatures, Variant } 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 getFeatureVariant: (state: StateWithFeatures, app: ApplicationName, feature: string) => Variant | null; export declare const hasLoadedInitialFlags: (state: StateWithFeatures) => boolean; /** * Helper to check if credits are enabled for a given address. * It will first check if the marketplace credits are enabled, if not, it will return false. * Then it will check if the user wallets variant is defined, if not, it will return true. * Then it will check if the address is in the user wallets variant, if not, it will return false. */ export declare const isCreditsFeatureEnabled: (state: StateWithFeatures, address: string) => boolean; export declare const getIsLauncherLinksFeatureEnabled: (state: StateWithFeatures) => boolean; export declare const getLauncherLinksVariant: (state: StateWithFeatures) => any;