import { G as GeolocationClient, E as UseGeolocationOptions, F as UseGeolocationResult, H as UseAlertsOptions, I as UseAlertsResult, q as DashboardMetrics, Z as UseLocationRequestsOptions, _ as UseLocationRequestsResult, $ as UseLocationCaptureOptions, a0 as UseLocationCaptureResult, D as DeviceFingerprintRequest } from './client-fisRnxD5.mjs'; export { useCipherText } from './geolocation/index.mjs'; import './types-DxnfRzF_.mjs'; /** * React Hooks for CGS Geolocation SDK * * Provides convenient React hooks for using the geolocation service in Next.js applications. */ /** * React hook for IP verification and compliance checking * * @param client - GeolocationClient instance * @param options - Hook options * @returns Geolocation verification state and methods * * @example * ```tsx * function LoginPage() { * const { verification, loading, error, verifyIP } = useGeolocation(client, { * autoVerify: true, * eventType: "login", * includeDeviceFingerprint: true * }); * * useEffect(() => { * if (verification?.is_blocked) { * alert("Access blocked: " + verification.risk_reasons.join(", ")); * } * }, [verification]); * * return
Risk Level: {verification?.risk_level}
; * } * ``` */ declare function useGeolocation(client: GeolocationClient, options?: UseGeolocationOptions): UseGeolocationResult; /** * React hook for alert management * * @param client - GeolocationClient instance * @param options - Hook options * @returns Alert state and management methods * * @example * ```tsx * function AlertDashboard() { * const { * alerts, * total, * loading, * fetchAlerts, * updateStatus, * resolveAlert * } = useAlerts(client, { * autoFetch: true, * filters: { status: "active", severity: "critical" }, * pollInterval: 30000 // Poll every 30 seconds * }); * * return ( *
*

{total} Alerts

* {alerts.map(alert => ( * resolveAlert(alert.id, "resolved", "Fixed")} * /> * ))} *
* ); * } * ``` */ declare function useAlerts(client: GeolocationClient, options?: UseAlertsOptions): UseAlertsResult; /** * React hook for dashboard metrics * * @param client - GeolocationClient instance * @param timeRangeHours - Time range in hours (default: 24) * @param autoFetch - Auto-fetch metrics on mount (default: true) * @returns Dashboard metrics state * * @example * ```tsx * function Dashboard() { * const { metrics, loading, refresh } = useDashboardMetrics(client, 168); // Last 7 days * * if (loading) return ; * * return ( *
*

Dashboard

* * * *
* ); * } * ``` */ declare function useDashboardMetrics(client: GeolocationClient, timeRangeHours?: number, autoFetch?: boolean): { metrics: DashboardMetrics | null; loading: boolean; error: Error | null; refresh: () => Promise; }; /** * Get browser information */ declare function getBrowserInfo(): { browser?: string; browser_version?: string; os?: string; }; /** * Create a complete device fingerprint for the current browser */ declare function createDeviceFingerprint(): DeviceFingerprintRequest; /** * React hook for managing location requests (admin/compliance officer) * * @param client - GeolocationClient instance * @param options - Hook options * @returns Location request state and management methods * * @example * ```tsx * function LocationRequestDashboard() { * const { * requests, * total, * loading, * createRequest, * cancelRequest, * refresh * } = useLocationRequests(client, { * autoFetch: true, * filters: { status: 'pending' }, * pollInterval: 30000 * }); * * const handleCreate = async () => { * const result = await createRequest({ * user_id: 'customer_123', * channel: 'sms', * phone: '+1234567890', * reason: 'Transaction verification' * }); * console.log('Share link:', result.share_link); * }; * * return ( *
*

{total} Location Requests

* * {requests.map(req => ( * cancelRequest(req.id)} * /> * ))} *
* ); * } * ``` */ declare function useLocationRequests(client: GeolocationClient, options?: UseLocationRequestsOptions): UseLocationRequestsResult; /** * React hook for location capture (customer-facing) * * Use this hook in the customer's browser to capture and submit their location. * The token is obtained from the share link sent via SMS/email. * * @param client - GeolocationClient instance * @param options - Hook options with token * @returns Location capture state and methods * * @example * ```tsx * function LocationSharePage({ token }: { token: string }) { * const { * shareInfo, * loading, * submitting, * error, * isExpired, * isCompleted, * captureAndSubmitGPS * } = useLocationCapture(client, { * token, * autoFetch: true * }); * * if (loading) return ; * if (isExpired) return ; * if (isCompleted) return ; * * return ( *
*

Reason: {shareInfo?.reason}

* * {error && } *
* ); * } * ``` */ declare function useLocationCapture(client: GeolocationClient, options: UseLocationCaptureOptions): UseLocationCaptureResult; export { UseAlertsOptions, UseAlertsResult, UseGeolocationOptions, UseGeolocationResult, UseLocationCaptureOptions, UseLocationCaptureResult, UseLocationRequestsOptions, UseLocationRequestsResult, createDeviceFingerprint, getBrowserInfo, useAlerts, useDashboardMetrics, useGeolocation, useLocationCapture, useLocationRequests };