import { EpsgCode, ImageFormat, 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 FilterDate {
    before?: string;
}
export interface Filter {
    date: FilterDate;
}
export interface MapConfigEvents {
    location: [MapLocation];
    tileMatrix: [TileMatrixSet];
    /** Layer information was changed
     *
     * [ LayerId, Style?, Pipeline? ]
     */
    layer: [string, string | null, string | null, string | null];
    /** should labels be shown */
    labels: [boolean];
    bounds: [LngLatBoundsLike];
    filter: [Filter];
    change: [];
    visibleLayers: [string];
}
export declare class MapConfig extends Emitter<MapConfigEvents> {
    style: string | null;
    layerId: string;
    tileMatrix: TileMatrixSet;
    config: string | null;
    debug: DebugState;
    visibleLayers: string | null;
    filter: Filter;
    terrain: string | null;
    /** Should labels be added to the current layer */
    labels: boolean;
    pipeline: string | null;
    imageFormat: ImageFormat | null;
    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;
    /** Used as source and layer id in the Style JSON for a given layer ID */
    get styleId(): string;
    updateFromUrl(search?: string): void;
    static toUrl(opts: MapConfig): string;
    toTileUrl(urlType: MapOptionType, tileMatrix?: TileMatrixSet, layerId?: string, style?: string | null, config?: string | null, date?: FilterDate, pipeline?: string | null, terrain?: string | null, imageFormat?: ImageFormat | null): string;
    getLocation(map: maplibregl.Map): MapLocation;
    transformLocation(lat: number, lon: number, zoom: number): MapLocation;
    setLocation(l: MapLocation): void;
    setTerrain(terrain: string | null): void;
    setTileMatrix(tms: TileMatrixSet): void;
    setFilterDateRange(dateRange: FilterDate): void;
    setLabels(labels: boolean): void;
    setLayerId(layer: string, style?: string | null, pipeline?: string | null, imageFormat?: ImageFormat | 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;
    /**
     * Human friendly layer namer
     *
     * @example "Kapiti Coast 0.10m Urban Aerial Photos (2017)"
     */
    title: string;
    /** Layer category */
    category?: string;
    upperLeft?: [number, number];
    lowerRight?: [number, number];
    /** What projections are enabled for this layer */
    projections: Set<EpsgCode>;
    /** Is a pipeline required for the layer */
    pipeline?: string;
    /** Is a image format required for the layer */
    imageFormat?: ImageFormat;
}
