export interface UseCookieOptions extends CookieOptions { /** * The initial rendering value used during SSR and the first client render. * Also used as the fallback value if the cookie is not present after hydration. */ initialValue?: string; } /** * Standard configuration options for browser cookies. */ export interface CookieOptions { /** * Expiration time in days from now. * If `days`, `maxAgeSeconds`, and `expires` are all omitted, this automatically defaults to `7`. */ days?: number; /** Expiration time in seconds from now. */ maxAgeSeconds?: number; /** Explicit Date object specifying when the cookie expires. */ expires?: Date; /** The URL path that must exist in the requested URL for the browser to send the Cookie header. Defaults to "/". */ path?: string; /** The domain for which the cookie is valid. */ domain?: string; /** If true, the cookie is only transmitted over secure (HTTPS) protocols. */ secure?: boolean; /** Controls cross-site request behavior. 'none' requires `secure: true`. */ sameSite?: "lax" | "strict" | "none"; } export declare class CookieConfigurationError extends Error { constructor(message: string); } /** * Synchronizes state with a browser cookie. * Strictly string-based and completely hydration-safe. * * Note: `useCookie` does not automatically synchronize changes between multiple hook instances or browser tabs. * * @param key - The name of the cookie (must conform to RFC 6265 token requirements). * @param options - Hook initialization options and default cookie configurations. * @param options.initialValue - The initial rendering value used during SSR and the first client render. * @param options.days - Expiration time in days (defaults to 7 if no other expiration is provided). * @param options.maxAgeSeconds - Expiration time in seconds from now. * @param options.expires - Explicit Date object specifying when the cookie expires. * @param options.path - The URL path for the cookie (defaults to "/"). * @param options.domain - The domain for which the cookie is valid. * @param options.secure - If true, the cookie is only transmitted over secure (HTTPS) protocols. * @param options.sameSite - Controls cross-site request behavior ('lax', 'strict', or 'none'). * @returns A tuple `[value, updateCookie, deleteCookie]`. */ export declare function useCookie(key: string, options?: UseCookieOptions): readonly [ string | undefined, (value: string, setOptions?: CookieOptions) => void, (deleteOptions?: Pick) => void ];