import { r as registerInstance, h, H as Host, a as getElement } from './index-b153bfd0.js';
import { L as Locale } from './locale-e5107fad.js';
import { g as getIconPath } from './assets-manager-7d6fc08f.js';
import './mer-animated-dots-7cbae6ef.js';
import 'lit';
import 'lit/directives/when.js';
import 'lit/directives/if-defined.js';

const KB_PROPERTY = "property";
const KB_OBJECT = "object";
const getPropertyIcon = (typeId, kbPropertiesTypes) => 
// The object icon has to be retrieved from the ObjectTypes array, by
// matching the ObjectData typeId with the ObjectType id
kbPropertiesTypes.find(propertyType => propertyType.id === typeId).icon;
const convertObjectTypeToTreeItem = (objectType) => ({
    caption: objectType.name,
    id: objectType.id,
    startImgSrc: objectType.icon,
    leaf: false,
    parts: "object-type tree-view-item",
    expanded: true,
    items: []
});
const convertObjectToTreeItem = (object, objectTypes) => ({
    caption: object.name,
    id: object.id,
    startImgSrc: objectTypes.get(object.typeId).icon,
    parts: "object tree-view-item",
    metadata: KB_OBJECT,
    leaf: true
});
const convertPropertyToTreeItem = (property, kbPropertiesTypes) => ({
    caption: property.name,
    id: property.id,
    startImgSrc: getPropertyIcon(property.typeId, kbPropertiesTypes),
    parts: "property tree-view-item",
    metadata: KB_PROPERTY,
    leaf: true
});
/**
 * Updates the tree model with the provided objects.
 * Objects may already exist and are placed under their parent node.
 * If the parent node doesn't exist (identified by typeId on ObjectTypes),
 * it is created and added at the bottom.
 *
 * @param {ObjectData[] | undefined} objects - The array of objects to update.
 * @param {Map<string, ObjectType>} objectTypesMap - A map of object types by ID.
 * @param {Set<string>} objectsSet - A set of existing object IDs.
 * @param {TreeViewModel} actualTreeState - The current tree state to be updated.
 * @returns {TreeViewModel} - The updated tree view model.
 */
const updateObjectsTreeModel = (objects, objectTypesMap, objectsSet, actualTreeState) => {
    if (!objects) {
        return [...actualTreeState];
    }
    const updatedTreeData = [...actualTreeState];
    objects.forEach(object => {
        // objects that already exists in the actual actualTreeState should not be added.
        if (objectsSet.has(object.id)) {
            // object already exists
            return;
        }
        const objectTreeItem = convertObjectToTreeItem(object, objectTypesMap);
        // TODO: Improve the algorithm efficiency. This check visits potentially all nodes
        // from the TreeViewModel on each iteration. Using a Map to pre-store the TreeView
        // nodes would improve efficiency.
        const objectTypeTreeItemIndex = updatedTreeData.findIndex(treeItem => treeItem.id === object.typeId);
        if (objectTypeTreeItemIndex === -1) {
            // Create and add new object type tree item
            const objectType = objectTypesMap.get(object.typeId);
            if (objectType) {
                const objectTypeTreeItem = convertObjectTypeToTreeItem(objectType);
                objectTypeTreeItem.items.push(objectTreeItem);
                updatedTreeData.push(objectTypeTreeItem);
            }
        }
        else {
            // objectType exists already. insert object as children of the object type tree item.
            updatedTreeData[objectTypeTreeItemIndex].items.push(objectTreeItem);
        }
        objectsSet.add(object.id);
    });
    return updatedTreeData;
};
/**
 * Converts an array of KB properties data into tree item data for a tree view.
 *
 * @param {KBPropertyData[]} properties - The array of KB property data.
 * @param {KBPropertyType[]} kbPropertiesTypes - The array of KB property types.
 * @param {TreeViewModel} actualTreeState - The current state of the tree.
 * @returns {TreeViewModel} - The updated tree view item models.
 */
const convertKbPropertiesDataToTreeItemData = (properties, kbPropertiesTypes, actualTreeState) => {
    if (!properties) {
        return [...actualTreeState];
    }
    const updatedTreeData = [...actualTreeState];
    properties.forEach(property => {
        // properties have no parent node, and they should be added at the beginning of the tree
        const propertyAlreadyExists = updatedTreeData.find(node => node.id === property.id) !== undefined;
        if (propertyAlreadyExists) {
            return;
        }
        const propertyTreeItem = convertPropertyToTreeItem(property, kbPropertiesTypes);
        updatedTreeData.unshift(propertyTreeItem);
    });
    return updatedTreeData;
};
/**
 * Removes properties from the tree model.
 *
 * @param {TreeViewModel} actualTreeState - The current state of the tree,
 * containing various tree view items.
 * @returns {TreeViewModel} - A new array of tree view items that excludes
 * any items with metadata of type `KB_PROPERTY`.
 */
const clearKbPropertiesFromTree = (actualTreeState) => actualTreeState.filter(item => item.metadata !== KB_PROPERTY);

const kbManagerExportCss = "button.button-secondary{border-color:var(--color-border-neutral-default)}:host{display:grid;block-size:100%;grid-template-rows:max-content 1fr max-content}section{display:contents}.header__field-group{grid-template:\"export-file-name buttons-container\" max-content \"checkboxes checkboxes\" max-content/1fr max-content}.export-file-name{grid-area:export-file-name}.header__buttons-container{grid-area:buttons-container}.header__checkboxes{grid-area:checkboxes;grid-template-columns:max-content max-content}.main{position:relative;padding-block:12px}";

var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
    if (kind === "a" && !f)
        throw new TypeError("Private accessor was defined without a getter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
        throw new TypeError("Cannot read private member from an object whose class did not declare it");
    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
    if (kind === "m")
        throw new TypeError("Private method is not writable");
    if (kind === "a" && !f)
        throw new TypeError("Private accessor was defined without a setter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
        throw new TypeError("Cannot write private member to an object whose class did not declare it");
    return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var _GxIdeKbManagerExport_instances, _GxIdeKbManagerExport_addKbDescriptionEl, _GxIdeKbManagerExport_componentLocale, _GxIdeKbManagerExport_animateEmptyState, _GxIdeKbManagerExport_exportAllEl, _GxIdeKbManagerExport_fileNameEl, _GxIdeKbManagerExport_kBPropertiesData, _GxIdeKbManagerExport_objectTypesMap, _GxIdeKbManagerExport_objectsSet, _GxIdeKbManagerExport_addKBPropertiesCallbackHandler, _GxIdeKbManagerExport_addObjectsCallbackHandler, _GxIdeKbManagerExport_addReferencesCallbackHandler, _GxIdeKbManagerExport_cancelCallbackHandler, _GxIdeKbManagerExport_clearButtonHandler, _GxIdeKbManagerExport_evaluateContentToDisplay, _GxIdeKbManagerExport_evaluateObjects, _GxIdeKbManagerExport_evaluateTreeViewFilters, _GxIdeKbManagerExport_exportAllChangedHandler, _GxIdeKbManagerExport_exportCallbackHandler, _GxIdeKbManagerExport_objectsTypesArrayToMap, _GxIdeKbManagerExport_objectsTreeCheckedItemsChangedHandler, _GxIdeKbManagerExport_sortTreeItems, _GxIdeKbManagerExport_renderFooter, _GxIdeKbManagerExport_updateObjects;
const FILE_ICON = getIconPath({
    category: "gemini-tools",
    name: "file",
    colorType: "on-surface"
});
const SETTINGS_ICON = getIconPath({
    category: "gemini-tools",
    name: "settings",
    colorType: "primary"
});
const GENERAL_REFERENCES_ICON = getIconPath({
    category: "window-tools",
    name: "references",
    colorType: "interactive"
});
const MENUS_NEW_OBJECT_ICON = getIconPath({
    category: "menus",
    name: "new-object",
    colorType: "on-primary"
});
const TREE_VIEW_ICON = getIconPath({
    category: "controls",
    name: "treeview"
});
const CHECKBOX_CHECKED_VALUE = "true";
const CSS_BUNDLES = [
    "resets/box-sizing",
    "components/button",
    "components/checkbox",
    "components/edit",
    "components/icon",
    "components/tree-view",
    "utils/form",
    "utils/layout",
    "utils/spacing",
    "utils/typography"
];
const GxIdeKbManagerExport = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        _GxIdeKbManagerExport_instances.add(this);
        _GxIdeKbManagerExport_addKbDescriptionEl.set(this, void 0);
        _GxIdeKbManagerExport_componentLocale.set(this, void 0);
        _GxIdeKbManagerExport_animateEmptyState.set(this, false);
        _GxIdeKbManagerExport_exportAllEl.set(this, void 0);
        _GxIdeKbManagerExport_fileNameEl.set(this, void 0);
        _GxIdeKbManagerExport_kBPropertiesData.set(this, void 0);
        /**
         * Stores the object types information (name, and icon)
         */
        // eslint-disable-next-line @stencil-community/own-props-must-be-private
        _GxIdeKbManagerExport_objectTypesMap.set(this, new Map());
        /**
         * Stores the object's id that have been added.
         */
        // eslint-disable-next-line @stencil-community/own-props-must-be-private
        _GxIdeKbManagerExport_objectsSet.set(this, new Set());
        _GxIdeKbManagerExport_addKBPropertiesCallbackHandler.set(this, async (_e) => {
            this.addKbPropertiesIsChecked =
                __classPrivateFieldGet(this, _GxIdeKbManagerExport_addKbDescriptionEl, "f").value === CHECKBOX_CHECKED_VALUE;
            if (this.addKbPropertiesIsChecked) {
                __classPrivateFieldSet(this, _GxIdeKbManagerExport_kBPropertiesData, await this.addKBPropertiesCallback(), "f");
                if (__classPrivateFieldGet(this, _GxIdeKbManagerExport_kBPropertiesData, "f").length) {
                    this.objectsTreeViewModel = convertKbPropertiesDataToTreeItemData(__classPrivateFieldGet(this, _GxIdeKbManagerExport_kBPropertiesData, "f"), this.kbPropertiesTypes, this.objectsTreeViewModel);
                }
            }
            else {
                // previous properties (if any) should be removed
                this.objectsTreeViewModel = clearKbPropertiesFromTree(this.objectsTreeViewModel);
            }
        });
        _GxIdeKbManagerExport_addObjectsCallbackHandler.set(this, async () => {
            __classPrivateFieldGet(this, _GxIdeKbManagerExport_exportAllEl, "f").value = undefined;
            this.exportAllIsChecked = false;
            const addedObjects = await this.addObjectsCallback();
            __classPrivateFieldGet(this, _GxIdeKbManagerExport_updateObjects, "f").call(this, addedObjects);
        });
        _GxIdeKbManagerExport_addReferencesCallbackHandler.set(this, async () => {
            const objects = await this.addReferencesCallback(this.checkedObjectsIds);
            __classPrivateFieldGet(this, _GxIdeKbManagerExport_updateObjects, "f").call(this, objects);
        });
        _GxIdeKbManagerExport_cancelCallbackHandler.set(this, async () => {
            const cancelled = await this.cancelCallback();
            if (cancelled) {
                this.exportingIsInProcess = false;
            }
        });
        _GxIdeKbManagerExport_clearButtonHandler.set(this, () => {
            this.objectsTreeViewModel = [];
            __classPrivateFieldGet(this, _GxIdeKbManagerExport_objectsSet, "f").clear();
            __classPrivateFieldGet(this, _GxIdeKbManagerExport_addKbDescriptionEl, "f").value = undefined;
            __classPrivateFieldGet(this, _GxIdeKbManagerExport_exportAllEl, "f").value = undefined;
        });
        _GxIdeKbManagerExport_evaluateContentToDisplay.set(this, () => {
            // Nothing to display on the tree-view
            if (!this.hasObjects && !this.exportAllIsChecked) {
                return (h("gx-ide-empty-state", { isAnimated: __classPrivateFieldGet(this, _GxIdeKbManagerExport_animateEmptyState, "f"), stateTitle: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").main.noObjectsToDisplay, key: "no-objects-empty-state" }, h("button", { class: "button-primary", onClick: __classPrivateFieldGet(this, _GxIdeKbManagerExport_addObjectsCallbackHandler, "f") }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").main.beginByADdingSomeObjects)));
            }
            else {
                __classPrivateFieldSet(this, _GxIdeKbManagerExport_animateEmptyState, true, "f"); // improve performance if is first render
            }
            if (this.exportAllIsChecked) {
                return (h("gx-ide-empty-state", { isAnimated: __classPrivateFieldGet(this, _GxIdeKbManagerExport_animateEmptyState, "f"), stateIconSrc: TREE_VIEW_ICON, stateTitle: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").main.exportAllMessage, key: "exporting-all-empty-state" }));
            }
            else {
                __classPrivateFieldSet(this, _GxIdeKbManagerExport_animateEmptyState, true, "f"); // improve performance if is first render
            }
            return (h("ch-tree-view-render", { class: "tree-view", checkbox: true, checked: true, dragDisabled: true, dropDisabled: true, filter: __classPrivateFieldGet(this, _GxIdeKbManagerExport_evaluateTreeViewFilters, "f").call(this), filterType: this.addKbPropertiesIsChecked && !this.exportAllIsChecked
                    ? "none"
                    : "metadata", model: this.objectsTreeViewModel, showLines: "last", toggleCheckboxes: true, sortItemsCallback: __classPrivateFieldGet(this, _GxIdeKbManagerExport_sortTreeItems, "f"), onCheckedItemsChange: __classPrivateFieldGet(this, _GxIdeKbManagerExport_objectsTreeCheckedItemsChangedHandler, "f") }));
        });
        _GxIdeKbManagerExport_evaluateObjects.set(this, () => {
            this.hasObjects =
                this.objectsTreeViewModel && this.objectsTreeViewModel.length > 0;
        });
        _GxIdeKbManagerExport_evaluateTreeViewFilters.set(this, () => {
            if (this.addKbPropertiesIsChecked && this.exportAllIsChecked) {
                return KB_PROPERTY; // only show properties
            }
            if (!this.addKbPropertiesIsChecked && !this.exportAllIsChecked) {
                return KB_OBJECT; // only show objects
            }
            return "none";
        });
        _GxIdeKbManagerExport_exportAllChangedHandler.set(this, (_event) => {
            this.exportAllIsChecked =
                __classPrivateFieldGet(this, _GxIdeKbManagerExport_exportAllEl, "f").value === CHECKBOX_CHECKED_VALUE;
        });
        _GxIdeKbManagerExport_exportCallbackHandler.set(this, async () => {
            this.exportingIsInProcess = true;
            const fileName = __classPrivateFieldGet(this, _GxIdeKbManagerExport_fileNameEl, "f").value;
            const checkedKbPropertiesIds = this.addKbPropertiesIsChecked
                ? this.checkedPropertiesIds
                : [];
            const checkedObjectIds = this.exportAllIsChecked
                ? undefined
                : this.checkedObjectsIds;
            this.exportCallback(fileName, checkedKbPropertiesIds, checkedObjectIds).then(() => {
                this.exportingIsInProcess = false;
            });
            // returns Promise<boolean> but no procedure was detailed on the spec.
        });
        _GxIdeKbManagerExport_objectsTreeCheckedItemsChangedHandler.set(this, (event) => {
            // filter 'checked objects' and 'checked properties' ids
            const checkedObjectsIds = [];
            const checkedPropertiesIds = [];
            const allItemsWithCheckbox = [...event.detail.values()];
            allItemsWithCheckbox.forEach(node => {
                if (node.item.checked && node.item.metadata === KB_OBJECT) {
                    checkedObjectsIds.push(node.item.id);
                }
                else if (node.item.checked && node.item.metadata === KB_PROPERTY) {
                    checkedPropertiesIds.push(node.item.id);
                }
            });
            this.checkedObjectsIds = checkedObjectsIds;
            this.checkedPropertiesIds = checkedPropertiesIds;
            this.atLeastOnePropertyItemIsChecked = this.checkedPropertiesIds.length > 0;
            this.atLeastOneObjectItemIsChecked = this.checkedObjectsIds.length > 0;
        });
        _GxIdeKbManagerExport_sortTreeItems.set(this, (subModel) => {
            // "property" items should be added on top.
            // else sort alphabetically by "caption" value.
            return subModel.sort((a, b) => {
                if (a.metadata === "property" && b.metadata !== "property") {
                    return -1;
                }
                if (b.metadata === "property" && a.metadata !== "property") {
                    return 1;
                }
                return a.caption.localeCompare(b.caption);
            });
        });
        _GxIdeKbManagerExport_renderFooter.set(this, () => {
            const referencesButtonEnabled = this.atLeastOneObjectItemIsChecked;
            const clearButtonEnabled = this.objectsTreeViewModel.length > 0;
            return (h("footer", { class: "footer dialog-footer-with-border dialog-footer-space-between space-body spacing-body-inline spacing-body-block-end" }, h("button", { class: "button-tertiary clear-btn", disabled: !clearButtonEnabled, part: "clear-button", onClick: clearButtonEnabled && __classPrivateFieldGet(this, _GxIdeKbManagerExport_clearButtonHandler, "f") }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").footer.clearButton), h("div", { class: "buttons-spacer" }, h("button", { class: "button-secondary button-icon-and-text", part: "references-button", disabled: !referencesButtonEnabled, onClick: referencesButtonEnabled && __classPrivateFieldGet(this, _GxIdeKbManagerExport_addReferencesCallbackHandler, "f") }, h("ch-image", { class: "icon-m", disabled: !referencesButtonEnabled, src: GENERAL_REFERENCES_ICON }), __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").footer.addReferencesButton), h("button", {
                // Add button
                class: "button-primary button-icon-and-text", disabled: this.exportAllIsChecked, part: "add-button", onClick: !this.exportAllIsChecked && __classPrivateFieldGet(this, _GxIdeKbManagerExport_addObjectsCallbackHandler, "f")
            }, h("ch-image", { class: "icon-m", disabled: this.exportAllIsChecked, src: MENUS_NEW_OBJECT_ICON }), __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").footer.addButton))));
        });
        _GxIdeKbManagerExport_updateObjects.set(this, (objectsDataArray) => {
            if (objectsDataArray.length) {
                const newObjectsTreeModel = updateObjectsTreeModel(objectsDataArray, __classPrivateFieldGet(this, _GxIdeKbManagerExport_objectTypesMap, "f"), __classPrivateFieldGet(this, _GxIdeKbManagerExport_objectsSet, "f"), this.objectsTreeViewModel);
                this.objectsTreeViewModel = newObjectsTreeModel;
            }
        });
        this.addKbPropertiesIsChecked = false;
        this.atLeastOnePropertyItemIsChecked = false;
        this.atLeastOneObjectItemIsChecked = false;
        this.checkedObjectsIds = [];
        this.checkedPropertiesIds = [];
        this.exportAllIsChecked = false;
        this.exportingIsInProcess = false;
        this.hasObjects = undefined;
        this.objectsTreeViewModel = [];
        this.addKBPropertiesCallback = undefined;
        this.addObjectsCallback = undefined;
        this.addReferencesCallback = undefined;
        this.cancelCallback = undefined;
        this.exportCallback = undefined;
        this.exportFileDirectoryCallback = undefined;
        this.fileName = undefined;
        this.kbPropertiesTypes = undefined;
        this.loader = false;
        this.objectTypes = undefined;
        this.optionsCallback = undefined;
    }
    objectsTreeViewModelChanged(newObjectsTreeViewModel) {
        this.hasObjects =
            newObjectsTreeViewModel && newObjectsTreeViewModel.length > 0;
        if (!this.hasObjects) {
            this.atLeastOnePropertyItemIsChecked = false;
            this.atLeastOneObjectItemIsChecked = false;
        }
    }
    objectTypesChanged(newObjectTypesArray) {
        __classPrivateFieldGet(this, _GxIdeKbManagerExport_instances, "m", _GxIdeKbManagerExport_objectsTypesArrayToMap).call(this, newObjectTypesArray);
    }
    async componentWillLoad() {
        __classPrivateFieldSet(this, _GxIdeKbManagerExport_componentLocale, await Locale.getComponentStrings(this.el), "f");
        __classPrivateFieldGet(this, _GxIdeKbManagerExport_evaluateObjects, "f").call(this);
        __classPrivateFieldGet(this, _GxIdeKbManagerExport_instances, "m", _GxIdeKbManagerExport_objectsTypesArrayToMap).call(this, this.objectTypes);
    }
    render() {
        const exportButtonEnabled = this.atLeastOnePropertyItemIsChecked ||
            this.atLeastOneObjectItemIsChecked ||
            this.exportAllIsChecked;
        const cancelButtonEnabled = this.exportingIsInProcess;
        return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("section", null, h("header", { class: "header dialog-header-with-border space-body spacing-body-inline spacing-body-block-start" }, h("div", { class: "field-group header__field-group" }, h("div", { class: "field field-inline export-file-name" }, h("label", { class: "label", htmlFor: "xpz-file" }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").header.exportFileName), h("ch-edit", { autoFocus: true, id: "xpz-file", class: "input", part: "xpz-file", value: this.fileName, startImgSrc: FILE_ICON, ref: (el) => (__classPrivateFieldSet(this, _GxIdeKbManagerExport_fileNameEl, el, "f")) })), h("div", { class: "header__buttons-container buttons-spacer" }, h("button", { id: "export-kb-btn", class: "button-primary export-btn", part: "export-btn", disabled: !exportButtonEnabled, onClick: exportButtonEnabled && __classPrivateFieldGet(this, _GxIdeKbManagerExport_exportCallbackHandler, "f") }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").header.exportButton), h("button", { id: "cancel-kb-export-btn", class: "button-secondary cancel-btn", part: "cancel-button", disabled: !cancelButtonEnabled, onClick: cancelButtonEnabled && __classPrivateFieldGet(this, _GxIdeKbManagerExport_cancelCallbackHandler, "f") }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").header.cancelButton), h("button", { "aria-label": __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").header.optionsButton, title: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").header.optionsButton, class: "button-tertiary button-icon-only options-btn", part: "select-kb-btn", onClick: this.optionsCallback }, h("ch-image", { class: "icon-m", src: SETTINGS_ICON }))), h("div", { class: "header__checkboxes field-group" }, h("ch-checkbox", { class: "checkbox add-kb-description", part: "add-kb-description", caption: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").main.addKnowledgeBaseDescription, checkedValue: CHECKBOX_CHECKED_VALUE, onInput: __classPrivateFieldGet(this, _GxIdeKbManagerExport_addKBPropertiesCallbackHandler, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeKbManagerExport_addKbDescriptionEl, el, "f")) }), h("ch-checkbox", { class: "checkbox", part: "export-all-checkbox", checkedValue: CHECKBOX_CHECKED_VALUE, caption: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").main.exportAll, onInput: __classPrivateFieldGet(this, _GxIdeKbManagerExport_exportAllChangedHandler, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeKbManagerExport_exportAllEl, el, "f")) })))), h("div", { class: "main spacing-body-inline" }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_evaluateContentToDisplay, "f").call(this), this.loader && this.exportingIsInProcess && (h("gx-ide-loader", { cancelLabel: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").loader.cancelLabel, loaderTitle: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").loader.title, cancelCallback: __classPrivateFieldGet(this, _GxIdeKbManagerExport_cancelCallbackHandler, "f"), show: true, class: "loader" }))), __classPrivateFieldGet(this, _GxIdeKbManagerExport_renderFooter, "f").call(this))));
    }
    static get assetsDirs() { return ["gx-ide-assets/kb-manager-export"]; }
    get el() { return getElement(this); }
    static get watchers() { return {
        "objectsTreeViewModel": ["objectsTreeViewModelChanged"],
        "objectTypes": ["objectTypesChanged"]
    }; }
};
_GxIdeKbManagerExport_addKbDescriptionEl = new WeakMap(), _GxIdeKbManagerExport_componentLocale = new WeakMap(), _GxIdeKbManagerExport_animateEmptyState = new WeakMap(), _GxIdeKbManagerExport_exportAllEl = new WeakMap(), _GxIdeKbManagerExport_fileNameEl = new WeakMap(), _GxIdeKbManagerExport_kBPropertiesData = new WeakMap(), _GxIdeKbManagerExport_objectTypesMap = new WeakMap(), _GxIdeKbManagerExport_objectsSet = new WeakMap(), _GxIdeKbManagerExport_addKBPropertiesCallbackHandler = new WeakMap(), _GxIdeKbManagerExport_addObjectsCallbackHandler = new WeakMap(), _GxIdeKbManagerExport_addReferencesCallbackHandler = new WeakMap(), _GxIdeKbManagerExport_cancelCallbackHandler = new WeakMap(), _GxIdeKbManagerExport_clearButtonHandler = new WeakMap(), _GxIdeKbManagerExport_evaluateContentToDisplay = new WeakMap(), _GxIdeKbManagerExport_evaluateObjects = new WeakMap(), _GxIdeKbManagerExport_evaluateTreeViewFilters = new WeakMap(), _GxIdeKbManagerExport_exportAllChangedHandler = new WeakMap(), _GxIdeKbManagerExport_exportCallbackHandler = new WeakMap(), _GxIdeKbManagerExport_objectsTreeCheckedItemsChangedHandler = new WeakMap(), _GxIdeKbManagerExport_sortTreeItems = new WeakMap(), _GxIdeKbManagerExport_renderFooter = new WeakMap(), _GxIdeKbManagerExport_updateObjects = new WeakMap(), _GxIdeKbManagerExport_instances = new WeakSet(), _GxIdeKbManagerExport_objectsTypesArrayToMap = function _GxIdeKbManagerExport_objectsTypesArrayToMap(objectTypesArray) {
    objectTypesArray.forEach(objectType => {
        __classPrivateFieldGet(this, _GxIdeKbManagerExport_objectTypesMap, "f").set(objectType.id, objectType);
    });
};
GxIdeKbManagerExport.style = kbManagerExportCss;

export { GxIdeKbManagerExport as gx_ide_kb_manager_export };

//# sourceMappingURL=gx-ide-kb-manager-export.entry.js.map