import { FeatureState } from 'maplibre-gl';
import { Feature, Map } from 'ol';
import { Coordinate } from 'ol/coordinate';
import { EventsKey } from 'ol/events';
import { Layer } from 'ol/layer';
import { ObjectEvent } from 'ol/Object';
import { FilterFunction } from '../../common/typedefs';
import { LayerGetFeatureInfoResponse } from '../../types';
import MaplibreStyleLayerRenderer from '../renderers/MaplibreStyleLayerRenderer';
import { MobilityLayerOptions } from './Layer';
import MaplibreLayer, { MaplibreLayerOptions } from './MaplibreLayer';
export type MaplibreStyleLayerOptions = {
    beforeId?: string;
    layers?: maplibregl.AddLayerObject[];
    layersFilter?: FilterFunction;
    maplibreLayer?: MaplibreLayer;
    queryRenderedLayersFilter?: FilterFunction;
} & MaplibreLayerOptions & MobilityLayerOptions;
/**
 * Layer that helps show/hide a specific subset of style layers of a [MaplibreLayer](./MaplibreLayer.js~MaplibreLayer.html).
 *
 * @example
 * import { MaplibreLayer, MaplibreStyleLayer } from 'mobility-toolbox-js/ol';
 *
 * const maplibreLayer = new MaplibreLayer({
 *   apiKey: 'yourApiKey',
 * });
 *
 * const layer = new MaplibreStyleLayer({
 *   maplibreLayer: maplibreLayer,
 *   layersFilter: (layer) => {
 *     // show/hide only style layers related to stations
 *     return /station/.test(layer.id);
 *   },
 * });
 *
 * @see <a href="/example/ol-maplibre-style-layer">OpenLayers MaplibreStyle layer example</a>
 * @extends {ol/layer/Layer~Layer}
 * @public
 */
declare class MaplibreStyleLayer extends Layer {
    highlightedFeatures: Feature[];
    olEventsKeys: EventsKey[];
    selectedFeatures: Feature[];
    get beforeId(): string;
    set beforeId(newValue: string | undefined);
    get layers(): maplibregl.AddLayerObject[];
    set layers(newValue: maplibregl.AddLayerObject[]);
    get layersFilter(): (layer: maplibregl.LayerSpecification) => boolean;
    set layersFilter(newValue: (layer: maplibregl.LayerSpecification) => boolean);
    /**
     * @deprecated Use MaplibreStyleLayer.maplibreLayer instead.
     */
    get mapboxLayer(): MaplibreLayer | undefined;
    get maplibreLayer(): MaplibreLayer;
    set maplibreLayer(newValue: MaplibreLayer);
    get queryRenderedLayersFilter(): (layer: maplibregl.LayerSpecification) => boolean;
    set queryRenderedLayersFilter(newValue: (layer: maplibregl.LayerSpecification) => boolean);
    get sources(): Record<string, maplibregl.SourceSpecification>;
    set sources(newValue: Record<string, maplibregl.SourceSpecification>);
    /**
     * @deprecated Use MaplibreStyleLayer.layer instead.
     */
    get styleLayer(): maplibregl.AddLayerObject;
    /**
     * @deprecated
     */
    set styleLayer(newValue: maplibregl.AddLayerObject);
    /**
     * Apply visibility to style layers that fits the styleLayersFilter function.
     */
    /**
     * @deprecated
     */
    get styleLayers(): maplibregl.AddLayerObject[];
    /**
     * @deprecated
     */
    set styleLayers(newValue: maplibregl.AddLayerObject[]);
    /**
     * Constructor.
     *
     * @param {Object} options
     * @param {string} [options.beforeId] The style layer id to use when the options.layers property is defined, unsused otherwise.
     * @param {maplibregl.AddLayerObject[]} [options.layers] The layers to add to the style on load.
     * @param {FilterFunction} [options.layersFilter] Filter function to decide which style layer to apply visiblity on. If not provided, the 'layers' property is used.
     * @param {MaplibreLayer} [options.maplibreLayer] The MaplibreLayer to use.
     * @param {FilterFunction} [options.queryRenderedLayersFilter] Filter function to decide which style layer are available for query.
     * @param {{[id: string]:maplibregl.SourceSpecification}} [options.sources] The sources to add to the style on load.
     * @public
     */
    constructor(options?: MaplibreStyleLayerOptions);
    addLayers(): void;
    addSources(): void;
    applyLayoutVisibility(evt?: ObjectEvent): void;
    /**
     * Initialize the layer.
     * @param {ol/Map~Map} map the Maplibre map.
     * @override
     */
    attachToMap(map: Map): void;
    /**
     * Create a copy of the MaplibreStyleLayer.
     *
     * @param {Object} newOptions Options to override. See constructor.
     * @return {MapboxStyleLayer} A MaplibreStyleLayer.
     * @public
     */
    clone(newOptions: MaplibreStyleLayerOptions): MaplibreStyleLayer;
    createRenderer(): MaplibreStyleLayerRenderer;
    /**
     * Terminate the layer.
     * @override
     */
    detachFromMap(): void;
    /**
     * Request feature information for a given coordinate.
     * @param {ol/coordinate~Coordinate} coordinate Coordinate to request the information at.
     * @return {Promise<FeatureInfo>} Promise with features, layer and coordinate.
     * @deprecated Use getFeatureInfoAtCoordinate([layer], coordinate) from mobility-toolbox-ol package instead.
     */
    getFeatureInfoAtCoordinate(coordinate: Coordinate): Promise<LayerGetFeatureInfoResponse>;
    /**
     * Highlight a list of features.
     * @param {Array<ol/Feature~Feature>} [features=[]] Features to highlight.
     * @deprecated Use layer.setFeatureState(features, {hover: true|false}) instead.
     */
    highlight(features?: Feature[]): void;
    /**
     * On Maplibre map load callback function. Add style layers and dynaimc filters.
     */
    onLoad(): void;
    removeLayers(): void;
    removeSources(): void;
    /**
     * Select a list of features.
     * @param {Array<ol/Feature~Feature>} [features=[]] Features to select.
     * @deprecated Use layer.setFeatureState(features, {selected: true|false}) instead.
     */
    select(features?: Feature[]): void;
    /**
     * Set the [feature state](https://maplibre.org/maplibre-style-spec/expressions/#feature-state) of the features.
     *
     * @param {ol/Feature~Feature[]} features
     * @param {{[key: string]: any}} state The feature state
     * @public
     */
    setFeatureState(features: Feature[], state: FeatureState): void;
    /**
     * Set if features are hovered or not.
     * @param {Array<ol/Feature~Feature>} features
     * @param {boolean} state Is the feature hovered
     * @deprecated Use layer.setFeatureState(features, {hover: true|false}) instead.
     */
    setHoverState(features: Feature[], state: boolean): void;
    setMapInternal(map: Map): void;
}
export default MaplibreStyleLayer;
