import { MercatorCoordinate } from 'mapbox-gl';
import { ProjectionDefinition } from 'proj4';
export { C as CustomLayer } from './mapbox-three-C01GoEU6.js';
import { BufferGeometry } from 'three';
import { Remote } from 'comlink';

declare function projectPositionsToMapboxMercators(positions: Float32Array, worldAnchor: MercatorCoordinate, offset?: [number, number, number], crs?: ProjectionDefinition, out?: Float32Array): Float32Array;

type ProjectOptions = {
    useWorker?: boolean;
    crs?: ProjectionDefinition;
    offset?: [number, number, number];
};
declare function projectGeometriesToMapboxCoords(geometry: BufferGeometry, anchor: MercatorCoordinate, options?: ProjectOptions): Promise<void>;
declare function projectGeometriesToMapboxCoords(geometries: BufferGeometry[], anchor: MercatorCoordinate, options?: ProjectOptions): Promise<void>;
declare function projectGeometryToMapboxCoords(geometry: BufferGeometry, anchor: MercatorCoordinate, options?: ProjectOptions): Promise<void>;

type ProjectGeometriesParams = {
    positions: ArrayBufferLike[];
    worldAnchor: MercatorCoordinate;
    /**
     * Precomputed `worldAnchor.meterInMercatorCoordinateUnits()` value. Comlink
     * structured-clones `worldAnchor` across the worker boundary, stripping
     * prototype methods — the worker can't call the method itself, so the main
     * thread computes the scalar before sending.
     */
    worldAnchorMeterScale: number;
    offset?: [number, number, number];
    crs?: ProjectionDefinition;
};
type ProjectGeometriesResult = {
    positions: ArrayBuffer[];
};
type MapboxWorkerApi = {
    projectGeometries(params: ProjectGeometriesParams): ProjectGeometriesResult;
};

type MapboxWorkerHandle = {
    api: Remote<MapboxWorkerApi>;
    terminate(): void;
};
declare function createMapboxWorker(): MapboxWorkerHandle;

export { type MapboxWorkerApi, type MapboxWorkerHandle, type ProjectGeometriesParams, type ProjectGeometriesResult, createMapboxWorker, projectGeometriesToMapboxCoords, projectGeometryToMapboxCoords, projectPositionsToMapboxMercators };
