import type { TileConfig } from '../types';
/**
 * Clean interface for experiment/feature flag clients.
 *
 * This is the ONLY interface consumers should use. The underlying
 * implementation (GrowthBook, LaunchDarkly, etc.) is an internal detail.
 */
export interface ExperimentClient {
    /**
     * Check if a tile should be rendered based on its experiment config.
     */
    shouldRenderRectangle(tile: TileConfig): boolean;
    /**
     * Get a feature flag value.
     */
    getFeatureValue?<T>(key: string, fallback: T): T;
    /**
     * Update user/device attributes for targeting.
     */
    setAttributes?(attrs: Record<string, unknown>): void;
    /**
     * Force specific experiment variations for preview/testing.
     * @param variations Map of experiment tracking key to variation index
     */
    setForcedVariations?(variations: Record<string, number>): void;
    /**
     * Refresh/load feature flags from the server.
     */
    refreshFeatures?(): Promise<void>;
    /**
     * Get all loaded features (for prefix-based discovery).
     * Returns a map of feature key -> feature value.
     */
    getAllFeatures?(): Record<string, unknown>;
    /**
     * Subscribe to feature flag value changes.
     * Called when the underlying provider receives updated feature values
     * (e.g., via streaming, webhook, or manual refresh).
     * Returns an unsubscribe function.
     */
    onFeaturesChanged?(callback: () => void): () => void;
}
/**
 * @deprecated Use ExperimentClient instead
 */
export type SyntroExperimentClient = ExperimentClient;
