import type { LatLngBoundsLike } from "../geo.js"; import { ObjectManager, type ManagedObject, type ObjectManagerOptions, type ObjectManagerEventMap, type ObjectManagerStats } from "./object-manager.js"; export interface RemoteObjectLoadContext { bounds: LatLngBoundsLike; zoom: number; signal: AbortSignal; reason: "add" | "move" | "reload"; } export type RemoteObjectLoader = (context: RemoteObjectLoadContext) => Promise | ManagedObject[] | null | undefined; export interface RemoteObjectManagerOptions extends ObjectManagerOptions { loader: RemoteObjectLoader; points?: never; source?: never; /** Delay for automatic viewport loads only, in milliseconds. Default 120. */ debounceMs?: number; replace?: boolean; } export interface RemoteObjectReloadOptions { /** Cancellation rejects reload() with AbortError; the loader receives a linked signal. */ signal?: AbortSignal; } type RemoteObjectMap = NonNullable; export interface RemoteObjectManagerEventMap extends Omit { loading: { context: RemoteObjectLoadContext; }; load: { context: RemoteObjectLoadContext; objects: ManagedObject[]; stats: ObjectManagerStats; }; abort: { context: RemoteObjectLoadContext; error: unknown; }; error: { context: RemoteObjectLoadContext; error: unknown; phase?: never; } | { phase: "layout"; error: unknown; context?: never; }; } export declare class RemoteObjectManager extends ObjectManager { #private; readonly loader: RemoteObjectLoader; readonly debounceMs: number; readonly replace: boolean; constructor(options: RemoteObjectManagerOptions); get loading(): boolean; addTo(map: RemoteObjectMap): this; detach(): this; /** Immediately loads the attached viewport. Rejects on cancellation, failure or detached use. */ reload(options?: RemoteObjectReloadOptions): Promise; cancel(): this; } export declare function remoteObjectManager(options: RemoteObjectManagerOptions): RemoteObjectManager; export {}; //# sourceMappingURL=remote-object-manager.d.ts.map