import * as React from 'react';
import React__default from 'react';
import * as _flopflip_types from '@flopflip/types';
import { TAdapter, TAdapterArgs, TAdaptersStatus, TFlags, TAdapterEventHandlers, TConfigureAdapterChildren, TAdapterContext, TAdapterIdentifiers, TReconfigureAdapter, TUser, TFlagsContext, TFlagName, TFlagVariation, AdapterSubscriptionStatus } from '@flopflip/types';

type RenderFnArgs = {
    isFeatureEnabled: boolean;
};
type TRenderFn = (args: RenderFnArgs) => React__default.ReactNode;
type TProps$2 = {
    readonly untoggledComponent?: React__default.ComponentType;
    readonly toggledComponent?: React__default.ComponentType;
    readonly render?: () => React__default.ReactNode;
    readonly children?: TRenderFn | React__default.ReactNode;
    readonly isFeatureEnabled: boolean;
};
declare function ToggleFeature({ untoggledComponent, toggledComponent, render, children, isFeatureEnabled, }: TProps$2): React__default.ReactNode;
declare namespace ToggleFeature {
    var displayName: string;
}

type TProps$1 = {
    readonly shouldDeferAdapterConfiguration?: boolean;
    readonly adapter: TAdapter;
    readonly adapterArgs: TAdapterArgs;
    readonly adapterStatus?: TAdaptersStatus;
    readonly defaultFlags?: TFlags;
    readonly onFlagsStateChange: TAdapterEventHandlers['onFlagsStateChange'];
    readonly onStatusStateChange: TAdapterEventHandlers['onStatusStateChange'];
    readonly render?: () => React__default.ReactNode;
    readonly children?: TConfigureAdapterChildren;
};
declare function ConfigureAdapter({ shouldDeferAdapterConfiguration, adapter, adapterArgs, adapterStatus, defaultFlags, onFlagsStateChange, onStatusStateChange, render, children, }: TProps$1): React__default.JSX.Element;
declare namespace ConfigureAdapter {
    var displayName: string;
}

declare const createAdapterContext: (adapterIdentifiers?: TAdapterIdentifiers[], reconfigure?: TReconfigureAdapter, status?: TAdaptersStatus) => TAdapterContext;
declare const AdapterContext: React.Context<TAdapterContext>;
declare const selectAdapterConfigurationStatus: (adaptersStatus?: TAdaptersStatus, adapterIdentifiers?: TAdapterIdentifiers[]) => {
    isReady: boolean;
    isUnconfigured: boolean;
    isConfiguring: boolean;
    isConfigured: boolean;
};

type TProps<TAdditionalUserProperties> = {
    readonly shouldOverwrite?: boolean;
    readonly user: TUser<TAdditionalUserProperties>;
    readonly children?: React__default.ReactNode;
};
declare function ReconfigureAdapter<TAdditionalUserProperties>({ shouldOverwrite, user, children, }: TProps<TAdditionalUserProperties>): string | number | bigint | true | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | null;
declare namespace ReconfigureAdapter {
    var displayName: string;
}

declare const DEFAULT_FLAG_PROP_KEY = "isFeatureEnabled";
declare const DEFAULT_FLAGS_PROP_KEY = "featureToggles";
declare const ALL_FLAGS_PROP_KEY = "@flopflip/flags";

declare const getFlagVariation: (allFlags: TFlagsContext, adapterIdentifiers: TAdapterIdentifiers[], flagName?: TFlagName) => TFlagVariation;

declare const getIsFeatureEnabled: (allFlags: TFlagsContext, adapterIdentifiers: TAdapterIdentifiers[], flagName?: TFlagName, flagVariation?: TFlagVariation) => boolean;

declare const isNil: (value: any) => boolean;

declare function wrapDisplayName(BaseComponent: React__default.ComponentType<any>, hocName: string): string;

declare const setDisplayName: <T extends React__default.ComponentType<any>>(nextDisplayName: string) => (BaseComponent: T) => T;

declare const useAdapterContext: () => _flopflip_types.TAdapterContext;

declare function useAdapterReconfiguration(): _flopflip_types.TReconfigureAdapter;

declare function useAdapterSubscription(adapter: TAdapter): (demandedAdapterSubscriptionStatus: AdapterSubscriptionStatus) => boolean;

type TToggleFeatureProps = TProps$2;
declare const version = "__@FLOPFLIP/VERSION_OF_RELEASE__";

export { ALL_FLAGS_PROP_KEY, AdapterContext, ConfigureAdapter, DEFAULT_FLAGS_PROP_KEY, DEFAULT_FLAG_PROP_KEY, ReconfigureAdapter, type TToggleFeatureProps, ToggleFeature, createAdapterContext, getFlagVariation, getIsFeatureEnabled, isNil, selectAdapterConfigurationStatus, setDisplayName, useAdapterContext, useAdapterReconfiguration, useAdapterSubscription, version, wrapDisplayName };
