import { Evented } from '../util/evented';
import StyleLayer from './style_layer';
import ImageManager from '../render/image_manager';
import GlyphManager from '../render/glyph_manager';
import Light from './light';
import LineAtlas from '../render/line_atlas';
import Dispatcher from '../util/dispatcher';
import { getType as getSourceType, setType as setSourceType } from '../source/source';
import type { SourceClass } from '../source/source';
import SourceCache from '../source/source_cache';
import { registerForPluginStateChange } from '../source/rtl_text_plugin';
import PauseablePlacement from './pauseable_placement';
import ZoomHistory from './zoom_history';
import CrossTileSymbolIndex from '../symbol/cross_tile_symbol_index';
import type Map from '../ui/map';
import type Transform from '../geo/transform';
import type { StyleImage } from './style_image';
import type { StyleGlyph } from './style_glyph';
import type { Callback } from '../types/callback';
import type EvaluationParameters from './evaluation_parameters';
import type { Placement } from '../symbol/placement';
import type { Cancelable } from '../types/cancelable';
import type { RequestParameters, ResponseCallback } from '../util/ajax';
import type { LayerSpecification, FilterSpecification, StyleSpecification, LightSpecification, SourceSpecification } from '../style-spec/types';
import type { CustomLayerInterface } from './style_layer/custom_style_layer';
import type { Validator } from './validate_style';
import type { OverscaledTileID } from '../source/tile_id';
export declare type StyleOptions = {
    validate?: boolean;
    localIdeographFontFamily?: string;
};
export declare type StyleSetterOptions = {
    validate?: boolean;
};
/**
 * @private
 */
declare class Style extends Evented {
    map: Map;
    stylesheet: StyleSpecification;
    dispatcher: Dispatcher;
    imageManager: ImageManager;
    glyphManager: GlyphManager;
    lineAtlas: LineAtlas;
    light: Light;
    _request: Cancelable | undefined | null;
    _spriteRequest: Cancelable | undefined | null;
    _layers: {
        [_: string]: StyleLayer;
    };
    _serializedLayers: {
        [_: string]: any;
    };
    _order: Array<string>;
    sourceCaches: {
        [_: string]: SourceCache;
    };
    zoomHistory: ZoomHistory;
    _loaded: boolean;
    _rtlTextPluginCallback: (a: any) => any;
    _changed: boolean;
    _updatedSources: {
        [_: string]: 'clear' | 'reload';
    };
    _updatedLayers: {
        [_: string]: true;
    };
    _removedLayers: {
        [_: string]: StyleLayer;
    };
    _changedImages: {
        [_: string]: true;
    };
    _updatedPaintProps: {
        [layer: string]: true;
    };
    _layerOrderChanged: boolean;
    _availableImages: Array<string>;
    crossTileSymbolIndex: CrossTileSymbolIndex;
    pauseablePlacement: PauseablePlacement;
    placement: Placement;
    z: number;
    static getSourceType: typeof getSourceType;
    static setSourceType: typeof setSourceType;
    static registerForPluginStateChange: typeof registerForPluginStateChange;
    constructor(map: Map, options?: StyleOptions);
    loadURL(url: string, options?: {
        validate?: boolean;
        accessToken?: string;
    }): void;
    loadJSON(json: StyleSpecification, options?: StyleSetterOptions): void;
    loadEmpty(): void;
    _load(json: StyleSpecification, validate: boolean): void;
    _loadSprite(url: string): void;
    _validateLayer(layer: StyleLayer): void;
    loaded(): boolean;
    _serializeLayers(ids: Array<string>): Array<any>;
    hasTransitions(): boolean;
    _checkLoaded(): void;
    /**
     * Apply queued style updates in a batch and recalculate zoom-dependent paint properties.
     * @private
     */
    update(parameters: EvaluationParameters): void;
    _updateTilesForChangedImages(): void;
    _updateWorkerLayers(updatedIds: Array<string>, removedIds: Array<string>): void;
    _resetUpdates(): void;
    /**
     * Update this style's state to match the given style JSON, performing only
     * the necessary mutations.
     *
     * May throw an Error ('Unimplemented: METHOD') if the mapbox-gl-style-spec
     * diff algorithm produces an operation that is not supported.
     *
     * @returns {boolean} true if any changes were made; false otherwise
     * @private
     */
    setState(nextState: StyleSpecification): boolean;
    addImage(id: string, image: StyleImage): this;
    updateImage(id: string, image: StyleImage): void;
    getImage(id: string): StyleImage | undefined | null;
    removeImage(id: string): this;
    _afterImageUpdated(id: string): void;
    listImages(): string[];
    addSource(id: string, source: SourceSpecification, options?: StyleSetterOptions): void;
    /**
     * Remove a source from this stylesheet, given its id.
     * @param {string} id id of the source to remove
     * @throws {Error} if no source is found with the given ID
     * @returns {Map} The {@link Map} object.
     */
    removeSource(id: string): this;
    /**
    * Set the data of a GeoJSON source, given its id.
    * @param {string} id id of the source
    * @param {GeoJSON|string} data GeoJSON source
    */
    setGeoJSONSourceData(id: string, data: GeoJSON.GeoJSON | string): void;
    /**
     * Get a source by id.
     * @param {string} id id of the desired source
     * @returns {Object} source
     */
    getSource(id: string): any;
    /**
     * Add a layer to the map style. The layer will be inserted before the layer with
     * ID `before`, or appended if `before` is omitted.
     * @param {Object | CustomLayerInterface} layerObject The style layer to add.
     * @param {string} [before] ID of an existing layer to insert before
     * @param {Object} options Style setter options.
     * @returns {Map} The {@link Map} object.
     */
    addLayer(layerObject: LayerSpecification | CustomLayerInterface, before?: string, options?: StyleSetterOptions): void;
    /**
     * Moves a layer to a different z-position. The layer will be inserted before the layer with
     * ID `before`, or appended if `before` is omitted.
     * @param {string} id  ID of the layer to move
     * @param {string} [before] ID of an existing layer to insert before
     */
    moveLayer(id: string, before?: string): void;
    /**
     * Remove the layer with the given id from the style.
     *
     * If no such layer exists, an `error` event is fired.
     *
     * @param {string} id id of the layer to remove
     * @fires error
     */
    removeLayer(id: string): void;
    /**
     * Return the style layer object with the given `id`.
     *
     * @param {string} id - id of the desired layer
     * @returns {?Object} a layer, if one with the given `id` exists
     */
    getLayer(id: string): any;
    /**
     * checks if a specific layer is present within the style.
     *
     * @param {string} id - id of the desired layer
     * @returns {boolean} a boolean specifying if the given layer is present
     */
    hasLayer(id: string): boolean;
    setLayerZoomRange(layerId: string, minzoom?: number | null, maxzoom?: number | null): void;
    setFilter(layerId: string, filter?: FilterSpecification | null, options?: StyleSetterOptions): void;
    /**
     * Get a layer's filter object
     * @param {string} layer the layer to inspect
     * @returns {*} the layer's filter, if any
     */
    getFilter(layer: string): any;
    setLayoutProperty(layerId: string, name: string, value: any, options?: StyleSetterOptions): void;
    /**
     * Get a layout property's value from a given layer
     * @param {string} layerId the layer to inspect
     * @param {string} name the name of the layout property
     * @returns {*} the property value
     */
    getLayoutProperty(layerId: string, name: string): any;
    setPaintProperty(layerId: string, name: string, value: any, options?: StyleSetterOptions): void;
    getPaintProperty(layer: string, name: string): any;
    setFeatureState(target: {
        source: string;
        sourceLayer?: string;
        id: string | number;
    }, state: any): void;
    removeFeatureState(target: {
        source: string;
        sourceLayer?: string;
        id?: string | number;
    }, key?: string): void;
    getFeatureState(target: {
        source: string;
        sourceLayer?: string;
        id: string | number;
    }): any;
    getTransition(): any;
    serialize(): any;
    _updateLayer(layer: StyleLayer): void;
    _flattenAndSortRenderedFeatures(sourceResults: Array<any>): any[];
    queryRenderedFeatures(queryGeometry: any, params: any, transform: Transform): any[];
    querySourceFeatures(sourceID: string, params?: {
        sourceLayer: string | undefined | null;
        filter: Array<any> | undefined | null;
        validate?: boolean;
    } | null): any[];
    addSourceType(name: string, SourceType: SourceClass, callback: Callback<void>): void;
    getLight(): any;
    setLight(lightOptions: LightSpecification, options?: StyleSetterOptions): void;
    _validate(validate: Validator, key: string, value: any, props: any, options?: {
        validate?: boolean;
    }): boolean;
    _remove(): void;
    _clearSource(id: string): void;
    _reloadSource(id: string): void;
    _updateSources(transform: Transform): void;
    _generateCollisionBoxes(): void;
    _updatePlacement(transform: Transform, showCollisionBoxes: boolean, fadeDuration: number, crossSourceCollisions: boolean, forceFullPlacement?: boolean): boolean;
    _releaseSymbolFadeTiles(): void;
    getImages(mapId: string, params: {
        icons: Array<string>;
        source: string;
        tileID: OverscaledTileID;
        type: string;
    }, callback: Callback<{
        [_: string]: StyleImage;
    }>): void;
    getGlyphs(mapId: string, params: {
        stacks: {
            [_: string]: Array<number>;
        };
    }, callback: Callback<{
        [_: string]: {
            [_: number]: StyleGlyph | undefined | null;
        };
    }>): void;
    getResource(mapId: string, params: RequestParameters, callback: ResponseCallback<any>): Cancelable;
}
export default Style;
//# sourceMappingURL=style.d.ts.map