/** * Reactive cookie helpers. * * @module bquery/platform */ import { type Signal } from '../reactive/signal'; /** Options for useCookie(). */ export interface UseCookieOptions { /** Default value when the cookie is not present. */ defaultValue?: T; /** Cookie path. Defaults to the global config or `/`. */ path?: string; /** Optional cookie domain. */ domain?: string; /** Cookie SameSite attribute. */ sameSite?: 'Strict' | 'Lax' | 'None'; /** Whether the cookie should be marked secure. */ secure?: boolean; /** Cookie expiry date. */ expires?: Date; /** Cookie max-age in seconds. */ maxAge?: number; /** Automatically persist signal updates back to document.cookie. */ watch?: boolean; /** Serialize a value before writing it into the cookie. */ serialize?: (value: T) => string; /** Deserialize a cookie string into a typed value. */ deserialize?: (value: string) => T; } /** * Create a reactive cookie signal. * * @template T - Cookie value type * @param name - Cookie name * @param options - Read/write configuration for the cookie * @returns Reactive signal representing the cookie value * * @example * ```ts * const theme = useCookie('theme', { defaultValue: 'light' }); * theme.value = 'dark'; * ``` */ export declare const useCookie: (name: string, options?: UseCookieOptions) => Signal; //# sourceMappingURL=cookies.d.ts.map