import type { GeoDetector, GeoDetectionResult, GeoDetectionResultWithLog } from "../core/types"; /** * Cloudflare geo-detection using headers * * Requires Cloudflare Worker or Transform Rule to set X-Is-EU-Country header */ export declare class CloudflareGeoDetector implements GeoDetector { private headerName; constructor(headerName?: string); detect(): Promise; } /** * IP API geo-detection using ipapi.co * * Free tier: 1000 requests/day * No API key required for basic usage */ export declare class IPAPIGeoDetector implements GeoDetector { private apiUrl; constructor(apiUrl?: string); detect(): Promise; } /** * Worker-based geo-detection using Cloudflare Worker /api/geo endpoint * * Uses request.cf data from Cloudflare edge — free, no rate limits, accurate. * Requires vue-privacy-worker (or compatible endpoint) deployed on the same domain. */ export declare class WorkerGeoDetector implements GeoDetector { private geoUrl; constructor(geoUrl: string); detect(): Promise; } /** * Fallback detector that uses browser timezone heuristics * * Not 100% accurate but works without external requests */ export declare class TimezoneGeoDetector implements GeoDetector { private euTimezones; detect(): Promise; } /** * Auto-detection chain: * Cloudflare headers → Worker /api/geo (if geoUrl set) → IP API → Timezone * * Returns extended result with log of all detection attempts for debugging. */ export declare class AutoGeoDetector implements GeoDetector { private cloudflare; private worker; private ipapi; private timezone; constructor(geoUrl?: string); detect(): Promise; } /** * Create a geo-detector based on mode */ export declare function createGeoDetector(mode: "auto" | "cloudflare" | "worker" | "api" | "always" | "never", geoUrl?: string): GeoDetector;