import type { LatLng } from './map.types'; export type DeviceLocationStatus = 'idle' | 'locating' | 'granted' | 'denied' | 'unavailable' | 'timeout'; export interface DeviceLocationReading { position: LatLng; /** Radius of the reported accuracy circle, in metres. */ accuracyMeters: number; /** * The platform flagged the reading as coming from a mock provider. * * Only some environments report this at all, so `false` means "not flagged", * never "proven genuine". Treat it as a signal, not as verification. */ mocked: boolean; timestamp: number; } export interface UseDeviceLocationOptions { enableHighAccuracy?: boolean; /** @default 10000 */ timeoutMs?: number; maximumAgeMs?: number; } /** * Reads the device's position, with every failure mode named. * * @description * Wraps `navigator.geolocation` so callers get a status they can render instead * of an untyped error: permission denied, no provider, or timed out are three * different situations for the user and only one of them is worth retrying. * * `mocked` surfaces the platform's own mock-provider flag when it exists. It is * a signal, not proof — deployments that must reject simulated coordinates need * server-side corroboration as well. */ export declare function useDeviceLocation(options?: UseDeviceLocationOptions): { locate: () => Promise; status: DeviceLocationStatus; reading: DeviceLocationReading | null; error: string | null; };