import type { App } from "vue"; import type { Router } from "vue-router"; import type { ConsentConfig } from "../core/types"; import { createConsentPlugin as createBasePlugin, ConsentBanner } from "../vue/index"; import { type RouterMiddlewareOptions } from "../vue/router-middleware"; /** * Quasar boot options extending ConsentConfig */ export interface QuasarBootOptions extends ConsentConfig { /** Router middleware options (beforeTrack, afterTrack) */ routerMiddleware?: RouterMiddlewareOptions; } /** * Quasar boot file for cookie consent with automatic SPA page tracking * * Automatically: * - Disables automatic page_view (SPA mode) * - Tracks initial page view after init * - Uses router.afterEach() for SPA navigation tracking * - Fires ga4Event from route meta * * @example * ```ts * // src/boot/consent.ts * import { boot } from 'quasar/wrappers'; * import { consentBoot } from '@structured-world/vue-privacy/quasar'; * * export default boot(consentBoot({ * gaId: 'G-XXXXXXXXXX', * })); * ``` * * @example * ```ts * // With middleware options * export default boot(consentBoot({ * gaId: 'G-XXXXXXXXXX', * routerMiddleware: { * beforeTrack: (to) => !to.path.startsWith('/admin'), * afterTrack: (to, eventName) => console.log('Tracked:', to.path, eventName), * } * })); * ``` */ export declare function consentBoot(options: QuasarBootOptions): ({ app, router }: { app: App; router?: Router; }) => void; /** * Quasar plugin (alternative to boot file, without automatic SPA tracking) * * @example * ```ts * // main.ts * import { createConsentPlugin } from '@structured-world/vue-privacy/quasar'; * app.use(createConsentPlugin({ gaId: 'G-XXX' })); * ``` */ export { createBasePlugin as createConsentPlugin }; export { ConsentBanner }; export { useConsent } from "../vue/index"; export { setupRouterTracking } from "../vue/router-middleware"; export type { RouterMiddlewareOptions } from "../vue/router-middleware"; export type { ConsentConfig } from "../core/types"; export type { GA4Item, GA4EcommerceParams, GA4PurchaseParams, GA4GenerateLeadParams, GA4RouteEvent, GA4RouteMeta, } from "../core/types";