export interface CookieAccessor { get: (name: string) => { value: string; } | undefined; set: (name: string, value: string, options?: { path?: string; expires?: Date; maxAge?: number; domain?: string; secure?: boolean; httpOnly?: boolean; sameSite?: 'strict' | 'lax' | 'none'; }) => void; } export interface RequestContext { url?: string; pathname?: string; host?: string; headers?: Record; } export type ABTestedDocument> = T & { posthogAssignedVariantKey?: string; posthogFeatureFlagKeyUsed?: string; posthogServerDistinctId?: string; posthogNewDistinctIdGenerated?: string; }; /** * Server-side helper to determine which A/B test variant to serve. * It reads cookies but DOES NOT set them directly. Cookie setting is delegated * to a Server Action or Route Handler. * * @param document The original Payload CMS document. * @param cookies The cookies object from Next.js `cookies()`. * @param context Optional request context for proper feature flag evaluation with release conditions. * @returns The content to display (either the variant or the original), augmented with PostHog details for client-side cookie setting. */ export declare const getServerSideABVariant: ; enableABTesting?: boolean; posthogFeatureFlagKey?: string; }, T extends Record = Record>(document: D & T, cookies: CookieAccessor, context?: RequestContext) => Promise>;