import { type P1ExperimentalFeature } from "./features"; export interface UseP1ExperimentalFeaturesOptions { /** * The signed-in person, as the key LaunchDarkly knows them by — the same one every * other P1 rollout check uses, so a person targeted in one place is targeted here * too. Absent — pre-auth, or signed out — means every feature off. */ userId: string | null | undefined; /** The site being edited. Absent narrows evaluation to the user alone. */ siteId?: string | null; /** * The id of the current site's Business account, so a feature can be targeted by * Business account. `undefined` means still loading and `null` means there is none. * Evaluation never waits for it: only a feature targeted by Business account is held * off until it settles, and is then answered for it. */ businessAccountId?: string | null; } export interface P1ExperimentalFeatures { /** * Whether one experimental feature is available. False until LaunchDarkly has * answered, so a gated component never flashes into view and back out. */ isEnabled: (feature: P1ExperimentalFeature) => boolean; /** * Whether LaunchDarkly has answered. Distinguishes "off" from "not yet known" for a * caller that wants to show a placeholder rather than nothing. */ resolved: boolean; } /** * Which experimental features are turned on for this person, on this site, in this Business account. * * Availability is Pantheon's to decide, so a caller asks and wires the answer through * rather than configuring anything: an unset flag, an unreachable LaunchDarkly and a * signed-out reader all report off. * * Resolved once per user and site for the life of the page, plus once more per Business * account for features targeted by it, and shared between every caller, so this can be called from as many components as need it. A flag changed * mid-session takes effect on the next load. */ export declare function useP1ExperimentalFeatures(options: UseP1ExperimentalFeaturesOptions): P1ExperimentalFeatures;