/// <reference types="mapbox-gl" />
import { MapDatasource, CsMap, ILayerAction, ILayerService, PropertyDetails, FeatureEventDetails, ILayerExtensionType, LayerFilter, LayerStyle, ILayerExtension } from '..';
import { MessageBusService, MessageBusManager, MessageBusHandle } from '@csnext/cs-core';
import { PropertyType, LayerLegend, DataSource, FeatureTypes, FeatureType } from '@csnext/cs-data';
export interface IMapLayerType {
    getInstance?: (init?: Partial<any>) => IMapLayer;
    typeId?: string;
    types?: string[];
}
export interface IMapLayer {
    id: string;
    title: string;
    tags: string[];
    state?: 'hidden' | 'loading' | 'visible';
    enabled?: boolean;
    sourceType?: string;
    color: string;
    description: string;
    logo?: string;
    popupContent?: string | Function | undefined;
    opacity?: number;
    source?: string | DataSource;
    type?: string;
    parentId?: string;
    style?: LayerStyle;
    extensions?: ILayerExtensionType[];
    filter?: any;
    externalUrl?: string;
    isEditable?: boolean;
    isDraggable?: boolean;
    isLive?: boolean;
    openFeatureDetails?: boolean;
    hideInLayerList?: boolean;
    featureTypes?: FeatureTypes;
    activeFeatureTypes?: string[];
    selectedFeature?: mapboxgl.MapboxGeoJSONFeature;
    _busManager: MessageBusManager;
    _events?: MessageBusService;
    _legends?: LayerLegend[];
    _filters?: {
        [key: string]: LayerFilter;
    };
    _manager?: MapDatasource;
    _extensions: ILayerExtension[];
    _service?: ILayerService;
    _showMenu?: boolean;
    _showMore?: boolean;
    _source?: DataSource;
    _featureEventHandle?: MessageBusHandle;
    addLayer(widget: CsMap): any;
    getBounds(): any;
    getLayerActions?(): ILayerAction[];
    initLayer(manager: MapDatasource): Promise<IMapLayer>;
    moveLayer(beforeId?: string): any;
    removeLayer(widget: CsMap): any;
    setFilter(filter: any[]): any;
    initFilter(property: string): any;
    applyFilter(filter: LayerFilter): any;
    removeFilter(filter: LayerFilter): any;
    setLegend(property: PropertyDetails | PropertyType | string, refreshLayer: boolean): any;
    setOpacity(value: number): any;
    setPopupContent(value: string | ((f: FeatureEventDetails) => {})): any;
    updateLayer(): any;
    updateLegends(): any;
    updateFilters(): any;
    getFeatureType(): FeatureType | undefined;
}
