import { EpsgCode, TileMatrixSet } from '@basemaps/geo';
import { Emitter } from '@servie/events';
import { LngLatBoundsLike } from 'maplibre-gl';
import { DebugState } from './config.debug.js';
import { MapLocation, MapOptionType } from './url.js';
export interface MapConfigEvents {
    location: [MapLocation];
    tileMatrix: [TileMatrixSet];
    layer: [string, string | null | undefined];
    bounds: [LngLatBoundsLike];
    change: null;
}
export declare class MapConfig extends Emitter<MapConfigEvents> {
    style: string | null;
    layerId: string;
    tileMatrix: TileMatrixSet;
    debug: DebugState;
    private _layers;
    get layers(): Promise<Map<string, LayerInfo>>;
    get isDebug(): boolean;
    /** Map location in WGS84 */
    _location: MapLocation;
    get location(): MapLocation;
    /** Map location in tileMatrix projection */
    get transformedLocation(): MapLocation;
    get isVector(): boolean;
    /** Key to reference the combined layer & style  */
    get layerKey(): string;
    /** Key to reference combined layer & style & tile matrix */
    get layerKeyTms(): string;
    updateFromUrl(search?: string): void;
    static toUrl(opts: MapConfig): string;
    toTileUrl(urlType: MapOptionType, tileMatrix?: TileMatrixSet, layerId?: string, style?: string | null): string;
    getLocation(map: maplibregl.Map): MapLocation;
    transformLocation(lat: number, lon: number, zoom: number): MapLocation;
    setLocation(l: MapLocation): void;
    setTileMatrix(tms: TileMatrixSet): void;
    setLayerId(layer: string, style?: string | null): void;
    setDebug<T extends keyof DebugState>(key: T, value?: DebugState[T]): void;
}
export interface LayerInfo {
    /** Layer id to use when fetching tiles */
    id: string;
    /** Layer name */
    name: string;
    /** Layer category */
    category?: string;
    upperLeft: [number, number];
    lowerRight: [number, number];
    /** What projections are enabled for this layer */
    projections: Set<EpsgCode>;
}
//# sourceMappingURL=config.map.d.ts.map