"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TreeviewsService = exports.ITreeViewsService = exports.TreeViewSelection = exports.TreeViewItem = exports.TreeItemCheckboxState = void 0;
var TreeItemCheckboxState;
(function (TreeItemCheckboxState) {
    TreeItemCheckboxState[TreeItemCheckboxState["Unchecked"] = 0] = "Unchecked";
    TreeItemCheckboxState[TreeItemCheckboxState["Checked"] = 1] = "Checked";
})(TreeItemCheckboxState || (exports.TreeItemCheckboxState = TreeItemCheckboxState = {}));
class TreeViewItem {
}
exports.TreeViewItem = TreeViewItem;
var TreeViewSelection;
(function (TreeViewSelection) {
    function is(arg) {
        return !!arg && typeof arg === 'object' && 'treeViewId' in arg && 'treeItemId' in arg;
    }
    TreeViewSelection.is = is;
})(TreeViewSelection || (exports.TreeViewSelection = TreeViewSelection = {}));
exports.ITreeViewsService = Symbol('ITreeViewsService');
class TreeviewsService {
    constructor() {
        this._dragOperations = new Map();
        this._renderedElements = new Map();
    }
    removeDragOperationTransfer(uuid) {
        if (uuid && this._dragOperations.has(uuid)) {
            const operation = this._dragOperations.get(uuid);
            this._dragOperations.delete(uuid);
            return operation;
        }
        return undefined;
    }
    addDragOperationTransfer(uuid, transferPromise) {
        this._dragOperations.set(uuid, transferPromise);
    }
    getRenderedTreeElement(node) {
        if (this._renderedElements.has(node)) {
            return this._renderedElements.get(node);
        }
        return undefined;
    }
    addRenderedTreeItemElement(node, element) {
        this._renderedElements.set(node, element);
    }
    removeRenderedTreeItemElement(node) {
        if (this._renderedElements.has(node)) {
            this._renderedElements.delete(node);
        }
    }
}
exports.TreeviewsService = TreeviewsService;
//# sourceMappingURL=treeview.js.map