import type { AbTestAssignment } from '../types'; import type { CachedAbTest } from './types'; /** * Perform weighted random selection to assign a variant. * * @param test - The cached test with pre-computed weights * @returns Object with selectedKey (variant ID or "control") and variant slug */ export declare function selectVariant(test: CachedAbTest): { selectedKey: string; variantSlug: string; }; /** * Create an assignment object for a newly selected variant. * * @param test - The cached test * @param selectedKey - The selected variant ID or "control" * @param variantSlug - The slug of the selected variant * @param originalPath - The original URL path where the test was assigned * @returns Assignment object to store in cookie */ export declare function createAssignment(test: CachedAbTest, selectedKey: string, variantSlug: string, originalPath: string): AbTestAssignment; /** * Validate an existing cookie assignment against current CMS config. * * @param test - The cached test with current config * @param assignment - The assignment from the cookie * @returns true if assignment is still valid, false if it should be re-assigned */ export declare function isValidAssignment(test: CachedAbTest, assignment: AbTestAssignment): boolean; //# sourceMappingURL=assignment.d.ts.map