import { type ReactNode } from 'react';
import type { FeatureFlagsClient } from '../shared/client';
import type { EvaluationContext, FlagValue } from '../shared/types';
/**
* Provider component that makes the FeatureFlagsClient available to all hooks.
*
* @example
* ```tsx
*
*
*
* ```
*/
export declare function FeatureFlyProvider({ client, children, }: {
client: FeatureFlagsClient;
children: ReactNode;
}): import("react").FunctionComponentElement>;
export interface UseFeatureFlagResult {
value: T;
loading: boolean;
error: Error | null;
}
/**
* React hook for evaluating a single feature flag.
* Automatically re-evaluates when the flag changes via streaming or cache invalidation.
*
* @param slug Flag slug identifier
* @param defaultValue Default value while loading
* @param context Optional evaluation context
*
* @example
* ```tsx
* const { value, loading } = useFeatureFlag('new-checkout', false);
*
* if (loading) return ;
* return value ? : ;
* ```
*/
export declare function useFeatureFlag(slug: string, defaultValue: T, context?: EvaluationContext): UseFeatureFlagResult;
export interface UseAllFlagsResult {
flags: Record;
loading: boolean;
error: Error | null;
}
/**
* React hook for batch-evaluating all feature flags.
*
* @example
* ```tsx
* const { flags, loading } = useAllFlags({ workspaceId: 'ws-123' });
* if (flags['dark-mode']) { ... }
* ```
*/
export declare function useAllFlags(context?: EvaluationContext): UseAllFlagsResult;