import type { ABTestName, ABTestVariant, MatomoABTestState } from "./ab-testing";
/**
* React hook that returns the activated variant for a given Matomo A/B test.
*
* Returns `null` while the test is not yet ready (script loading, not
* participating, or not enabled). Once a variant is activated it returns
* the variant name and never changes again for the lifetime of the
* component.
*
* @param abTestName - The experiment name as registered via `initABTesting`
* @param timeoutMs - Maximum time (ms) to wait for Matomo (default: 5 000)
* @returns The variant name or `null`
*
* @example
* ```tsx
* const variant = useABTestVariant("homepage-hero");
*
* if (variant === "new-hero") {
* return ;
* }
* return ;
* ```
*/
export declare function useABTestVariant(abTestName: ABTestName, timeoutMs?: number): ABTestVariant | null;
/**
* React 18+ hook that subscribes to the A/B test store synchronously.
*
* Unlike `useABTestVariant` this does **not** use polling; instead it
* re-renders only when the store is written to. It relies on
* `useSyncExternalStore` and a tiny pub/sub layer.
*
* Falls back to `null` on the server (SSR-safe).
*
* @param abTestName - The experiment name
*/
export declare function useABTestVariantSync(abTestName: ABTestName): ABTestVariant | null;
/**
* Read the full A/B test state object for a given test name.
*
* @param testName - Experiment name
* @returns The state object or `null` if not found
*/
export declare function readABTestState(testName: ABTestName): MatomoABTestState | null;
//# sourceMappingURL=use-ab-test.d.ts.map