//#region src/shims/internal/cookie-serialize.d.ts
/**
 * Set-Cookie serialization for the mutable next/headers shim.
 *
 * `ResponseCookies` in server.ts deliberately uses the exact
 * @edge-runtime/cookies serialization order and casing instead. It also has to
 * preserve the absence of a default path when parsing an existing Set-Cookie
 * header, while this helper always defaults new mutable cookies to `Path=/`.
 *
 * Note: this is a value-encoding helper for response cookies only. The
 * request `Cookie:` header serialization in `RequestCookies._serialize`
 * (server.ts) intentionally lives separately — it builds a different format
 * (no attributes, just `name=value; name=value`) and shouldn't share this
 * code.
 */
type SerializeSetCookieOptions = {
  path?: string;
  domain?: string;
  maxAge?: number;
  expires?: Date;
  httpOnly?: boolean;
  secure?: boolean;
  sameSite?: true | false | "strict" | "lax" | "none" | "Strict" | "Lax" | "None";
  partitioned?: boolean;
  priority?: "low" | "medium" | "high";
};
declare function validateCookieName(name: string): void;
/**
 * Validate cookie attribute values (path, domain) to prevent injection
 * via semicolons, newlines, or other control characters.
 */
declare function validateCookieAttributeValue(value: string, attributeName: string): void;
/**
 * Build a Set-Cookie header string from a cookie name, value, and attributes.
 *
 * - Encodes the value with `encodeURIComponent`.
 * - Defaults `Path` to `/` (matching @edge-runtime/cookies and Next.js).
 * - Validates path/domain to reject control characters and semicolons.
 * - Emits attributes in the same order and casing as Next.js's compiled
 *   `@edge-runtime/cookies` serializer: Path, Expires, Max-Age, Domain,
 *   Secure, HttpOnly, SameSite, Partitioned, Priority.
 *
 * The caller is responsible for validating the cookie name (typically before
 * mutating any internal state) via `validateCookieName`.
 */
declare function serializeSetCookie(name: string, value: string | null | undefined, options?: SerializeSetCookieOptions): string;
//#endregion
export { serializeSetCookie, validateCookieAttributeValue, validateCookieName };