import { Attribution } from '@basemaps/attribution';
import { AttributionBounds } from '@basemaps/attribution/build/attribution.js';
import * as maplibre from 'maplibre-gl';
export declare class MapAttributionState {
    /** Cache the loading of attribution */
    attrs: Map<string, Promise<Attribution | null>>;
    /** Rendering process needs sync access */
    attrsSync: Map<string, Attribution>;
    private getLayer;
    /**
     * Load the attribution fo all layers
     * @returns
     */
    getAll(): Promise<Attribution | null>;
    /** Load a attribution from a url, return a cached copy if we have one */
    getCurrentAttribution(): Promise<Attribution | null>;
    /** Filter the attribution to the map bounding box */
    filterAttributionToMap(attr: Attribution, map: maplibregl.Map): AttributionBounds[];
    isIgnored: (attr: AttributionBounds) => boolean;
}
export declare const MapAttrState: MapAttributionState;
/**
 * Handles displaying attributions for the OpenLayers interface
 */
export declare class MapAttribution implements maplibre.IControl {
    /** handle for scheduleRender setTimeout */
    private _scheduled;
    /** handle for scheduleRender requestAnimationFrame */
    private _raf;
    bounds: maplibre.LngLatBounds;
    zoom: number;
    attrHtml: HTMLDivElement;
    attrContainer: HTMLDivElement;
    map?: maplibre.Map;
    constructor();
    onAdd(map: maplibre.Map): HTMLElement;
    onRemove(map: maplibre.Map): void;
    _events: (() => boolean)[];
    /**
     * Trigger an attribution text update.
     */
    resetAttribution: () => void;
    /**
     * Trigger an attribution text update, will not update if the attribution text not change.
     * Will fetch attributions if needed
     */
    updateAttribution: () => void;
    /**
     * Only update attributions at most every 200ms
     */
    private scheduleRender;
    /**
     * Set the attribution text if needed
     */
    renderAttribution: () => void;
    setAttribution(text: string): void;
}
