import { MarkupSheet2D } from './MarkupSheet2D';
import { LayerInterface, LayerFailure } from '../Layer';
import { BimChangeBlob, BimChangeDwg } from '../../loader/bim-api-client';
import { MarkupEntityBase } from './MarkupEntityBase';
import { MergableObjectWithState, MergableObjectState } from '../../MergableSet';
import { Observable } from '../../loader/babylonjs-import';
import { MarkupLayerEvent2D, MarkupProperty } from '../MarkupEntityTypes';
import { Permissions } from '../../loader/Permission';
/**
 * Collection of all the {@link MarkupSheet2D} instances that have been created locally and loaded via the markup API.
 */
export declare class MarkupSheet2DCollection {
    readonly observable: Observable<MarkupLayerEvent2D>;
    readonly attachedTo: BimChangeDwg | BimChangeBlob;
    /**
     * Do not use this directly, use {@link MarkupSheet2DCollection.saveAndMerge} etc instead.
     * @hidden
     */
    _layer: LayerInterface<MarkupEntityBase>;
    /**
     * Do not use. This is created automatically when you call {@link MarkupSheets2DApi.getOrLoadSheets}.
     * @hidden
     */
    constructor(observable: Observable<MarkupLayerEvent2D>, attachedTo: BimChangeDwg | BimChangeBlob);
    [Symbol.iterator](): IterableIterator<MarkupSheet2D>;
    /**
     * @param states Array of states used to filter out sheets,
     * default is [MergableObjectState.Added, MergableObjectState.Modified, MergableObjectState.Unchanged].
     *
     * @example
     * ```typescript
     * // Loops all modified sheets in this collection.
     * for(const modifiedSheets of collection.sheets([MergableObjectState.Modified])) {
     *  ...
     * }
     * ```
     */
    sheets(states?: MergableObjectState[]): IterableIterator<MarkupSheet2D>;
    /**
     * Creates a new markup sheet and adds it to the layer api.
     * @param id The id for the new sheet (has to be unique).
     * @param properties Properties for the sheet.
     * @returns The new markup sheet.
     */
    addSheet(id: string, properties?: Map<string, MarkupProperty>): MarkupSheet2D;
    /**
     * Get a markup sheet based on id.
     * @param entityOrId Id of the markup sheet you are trying to get.
     * @returns The markup sheet if it exists, undefined if no markup sheet of that id exists.
     */
    get(entityOrId: string | Pick<MarkupEntityBase, 'id'>): MergableObjectWithState<MarkupEntityBase> | undefined;
    /**
     * Clear the layer.
     */
    clear(): void;
    /**
     * `true` if a layer exists and if {@link Layer.saveAndMerge} or {@link Layer.loadAndMerge}
     * has been called successfully at least once.
     */
    get isLoaded(): boolean;
    /**
     * Loads all existing (remote) objects from the backend and attempts to merge them into {@link objects}.
     * This may result in conflicts between the local and the remote objects. A typical example is if the same
     * object has been modified locally but also remotely (in the backend.)
     */
    loadAndMerge(): Promise<number | LayerFailure>;
    /**
     * Get the version of the currently loaded layer. [-1] if no layer has yet been loaded.
     */
    get version(): number;
    /**
     * Number of objects with conflicts in the layer. A conflict occurs if there is a mismatch between the local
     * and the remote representation of the layer. Conflicts can only occur when {@link Layer.saveAndMerge} or {@link Layer.loadAndMerge}
     * is called.
     */
    get conflictCount(): number;
    /**
     * Number of objects in layer not marked with state {@link MergableObjectState.Unchanged}.
     */
    get changeCount(): number;
    /**
     * `true` if user has permission to update the layer.
     */
    get permission(): Permissions;
    /**
     * Get the objects currently in the layer
     */
    get objects(): IterableIterator<Readonly<MergableObjectWithState<MarkupEntityBase>>>;
    /**
     * Save the sheets using the layer api.
     * @param overwrite If true then the last version will be overwritten.
     * @returns Number of conflicts, if > 0 then save was not successfull.
     */
    saveAndMergeSheets(overwrite?: boolean): Promise<number | LayerFailure>;
    /**
     * Conflicts in the layer. A conflict occurs if there is a mismatch between the local
     * and the remote representation of a object in the layer. Conflicts can only occur when {@link Layer.saveAndMerge} or {@link Layer.loadAndMerge}
     * is called.
     */
    conflicts(): Readonly<MergableObjectWithState<MarkupEntityBase>>[];
}
//# sourceMappingURL=MarkupSheet2DCollection.d.ts.map