import { LayerCompatibleChange } from '../loader/bim-api-client';
import { MergableObject } from '../MergableSet';
import { Layer, Serialize, LayerFailure, LayerInterface } from './Layer';
import { BimApi } from '../BimApi';
/**
 * Manages a set of layers ({@link Layer}) of a specified format. Layers can be added and unloaded.
 */
export declare class LayerApi<P extends MergableObject<P>, LayerDataTransferObject> {
    private readonly _api;
    readonly layerFormat: string;
    private readonly _serialize;
    private readonly _layers;
    /**
     *
     * @param _api API instance to use
     * @param layerFormat Type of layer. For example "sensor"
     * @param _serialize Methods to convert between layer objects (implements {@link MergableObject}) and their DTO's (data transferable object).
     * DTO's are what is actually stored in the layers (think of it as serialized layer objects).
     */
    constructor(_api: BimApi, layerFormat: string, _serialize: Serialize<LayerDataTransferObject, P, LayerInterface<P>>);
    /**
     * Get a layer for a specified change
     * @param change Change to get layer for.
     * @return Either the {@link Layer} or a {@link LayerFailure}. Use {@link isFailure} to check if the return value is a f{@link LayerFailure}
     * or a {@link Layer}.
     */
    getOrLoadLayer<Change extends LayerCompatibleChange>(change: Change): Promise<Layer<Change, P, LayerDataTransferObject> | LayerFailure>;
    /**
     * Unloads layer of type {@link layerFormat} from specified change
     * @param change Change to unload layer for.
     * @return `true` if layer was unloaded. `false` if layer did not exist in {@link LayerApi}.
     */
    unload(change: Pick<LayerCompatibleChange, 'id'> | string): boolean;
    private noPermissionsLayerDefinitionFailure;
    private notFoundLayerDefinitionFailure;
    private createFailureTraceProperties;
}
//# sourceMappingURL=layerapi.d.ts.map