import type { H3Event } from 'h3'; import type { AllConsentNames } from 'c15t'; /** * Parse the compact `key:value,key:value` payload c15t writes into the cookie. * Exported so tests can exercise it directly. */ export declare function parseC15tCookieValue(raw: string): Record; export type ConsentCondition = AllConsentNames | { or: AllConsentNames[]; } | { and: AllConsentNames[]; }; export interface ServerConsentReader { consents: Record; has(condition: ConsentCondition): boolean; } /** * Server-side reader for consent state from the request cookie. * * Auto-imported in server routes/middleware/API handlers. Works with h3's * event object — pass it explicitly, or rely on Nuxt's request context. * * @example * ```ts * // server/middleware/analytics.ts * export default defineEventHandler((event) => { * const consent = useC15tConsent(event) * if (consent.has('measurement')) { * // inject analytics * } * }) * ``` */ export declare function useC15tConsent(event: H3Event): ServerConsentReader;