import { AXClickEvent, NXComponent, AXComponent, AXCommonModule } from '@acorex/cdk/common';
import { AXLoadingComponent, AXLoadingModule } from '@acorex/components/loading';
import { AXTooltipDirective, AXTooltipModule } from '@acorex/components/tooltip';
import { AXPlatform } from '@acorex/core/platform';
import { AXTranslatorPipe } from '@acorex/core/translation';
import * as i1 from '@angular/common';
import { CommonModule, NgTemplateOutlet, AsyncPipe } from '@angular/common';
import * as i0 from '@angular/core';
import { inject, input, model, effect, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, signal, output, Input, HostBinding, NgModule } from '@angular/core';
import { AXCheckBoxComponent, AXCheckBoxModule } from '@acorex/components/check-box';
import { AXDecoratorGenericComponent, AXDecoratorIconComponent, AXDecoratorModule } from '@acorex/components/decorators';
import * as i1$1 from '@angular/forms';
import { FormsModule } from '@angular/forms';
import { AXFormModule } from '@acorex/components/form';

class AXTreeItemClickBaseEventLegacy extends AXClickEvent {
}
class AXTreeViewBaseLegacy {
}

class AXTreeViewItemLegacyComponent extends NXComponent {
    constructor() {
        super();
        this.treeView = inject(AXTreeViewBaseLegacy);
        this.item = input(...(ngDevMode ? [undefined, { debugName: "item" }] : []));
        this.isExpanded = model(false, ...(ngDevMode ? [{ debugName: "isExpanded" }] : []));
        this.isActive = model(false, ...(ngDevMode ? [{ debugName: "isActive" }] : []));
        this.isLoading = input(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
        this.executorChanges = input(...(ngDevMode ? [undefined, { debugName: "executorChanges" }] : []));
        this.platformService = inject(AXPlatform);
        this.#eff = effect(() => {
            console.log(this.item()[this.treeView.tooltipField()]);
        }, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
        this.arrowIcon = computed(() => {
            const baseClasses = 'ax-tree-view-arrow ax-icon ax-icon-solid';
            const toggleIcons = this.treeView.toggleIcons();
            if (toggleIcons) {
                return this.isExpanded() ? `${baseClasses} ${toggleIcons.expanded}` : `${baseClasses} ${toggleIcons.collapsed}`;
            }
            if (this.isExpanded()) {
                return `${baseClasses} ax-icon-chevron-down`;
            }
            return this.platformService.isRtl()
                ? `${baseClasses} ax-icon-chevron-left`
                : `${baseClasses} ax-icon-chevron-right`;
        }, ...(ngDevMode ? [{ debugName: "arrowIcon" }] : []));
    }
    #eff;
    handleArrowNodeClick() {
        if (this.item()[this.treeView.disableField()] || this.isLoading() || this.treeView.expandOn() === 'dbClick') {
            return;
        }
        this.isExpanded.set(!this.isExpanded());
        if (this.treeView.itemsPromise && this.isExpanded() && !this.item()[this.treeView.childrenField()]?.length) {
            this.treeView.fetchData(this.item());
            this.treeView.setNodeLoading(this.item()[this.treeView.valueField()], true);
        }
        this.treeView.onCollapsedChanged.emit({ component: this, data: this.item(), nativeElement: this.nativeElement });
    }
    handleTextClick() {
        if (this.item()[this.treeView.disableField()]) {
            return;
        }
        if (this.treeView.focusNodeEnabled()) {
            this.treeView.handleUnActiveNode(this.treeView.itemsSignal());
            this.item()[this.treeView.activeField()] = true;
        }
        this.treeView.onNodeClick.emit({ component: this, data: this.item(), nativeElement: this.nativeElement });
    }
    handleTextDbClick() {
        if (this.item()[this.treeView.disableField()] || this.treeView.expandOn() === 'click') {
            return;
        }
        if (this.item()?.[this.treeView.childrenField()] || this.item()[this.treeView.hasChildField()]) {
            this.isExpanded.set(!this.isExpanded());
            if (this.treeView.itemsPromise && this.isExpanded()) {
                this.treeView.fetchData(this.item());
                this.treeView.setNodeLoading(this.item()[this.treeView.valueField()], true);
            }
        }
        this.treeView.onNodedbClick.emit({ component: this, data: this.item(), nativeElement: this.nativeElement });
        this.treeView.onCollapsedChanged.emit({ component: this, data: this.item(), nativeElement: this.nativeElement });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXTreeViewItemLegacyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AXTreeViewItemLegacyComponent, isStandalone: true, selector: "ax-tree-view-item-legacy", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, isExpanded: { classPropertyName: "isExpanded", publicName: "isExpanded", isSignal: true, isRequired: false, transformFunction: null }, isActive: { classPropertyName: "isActive", publicName: "isActive", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, executorChanges: { classPropertyName: "executorChanges", publicName: "executorChanges", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isExpanded: "isExpandedChange", isActive: "isActiveChange" }, providers: [{ provide: AXComponent, useExisting: AXTreeViewItemLegacyComponent }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-tree-view-container\">\n  @if (\n    (treeView.showEmptyNodeMassage() && item().hasOwnProperty(treeView.childrenField())) ||\n    (item()[this.treeView.childrenField()]?.length && !isLoading()) ||\n    (item()[treeView.hasChildField()] && !isLoading())\n  ) {\n    <div class=\"ax-tree-view-icon-container\" (click)=\"handleArrowNodeClick()\">\n      <i [class.ax-state-disabled]=\"item()[treeView.disableField()]\" class=\"{{ arrowIcon() }}\"></i>\n    </div>\n  } @else if (isLoading()) {\n    <ax-loading></ax-loading>\n  }\n  <div class=\"ax-tree-view-items\">\n    <ng-content select=\"ax-check-box\"></ng-content>\n    <div\n      [class.ax-state-disabled]=\"item()[treeView.disableField()]\"\n      [axTooltip]=\"item()[treeView.tooltipField()]\"\n      axTooltipPlacement=\"end-bottom\"\n      (click)=\"handleTextClick()\"\n      (dblclick)=\"handleTextDbClick()\"\n      class=\"ax-tree-view-items-prefix ax-noselect-tree-view\"\n      [class.ax-state-tree-view-active]=\"item()[treeView.activeField()]\"\n    >\n      @if (treeView.itemTemplate) {\n        <ng-container\n          [ngTemplateOutlet]=\"treeView.itemTemplate\"\n          [ngTemplateOutletContext]=\"{ $implicit: item() }\"\n        ></ng-container>\n      } @else {\n        <ng-content select=\"ax-prefix\"></ng-content>\n        <ng-content select=\"ax-text\"></ng-content>\n        <ng-content select=\"ax-suffix\"></ng-content>\n      }\n    </div>\n  </div>\n</div>\n\n@if (isExpanded()) {\n  <div\n    animate.enter=\"ax-fade-slide-in\"\n    animate.leave=\"ax-fade-slide-out\"\n    class=\"ax-tree-view-child\"\n    [class.ax-tree-view-empty-child]=\"\n      treeView.showEmptyNodeMassage() &&\n      item().hasOwnProperty(treeView.childrenField()) &&\n      !item()[treeView.childrenField()]?.length\n    \"\n  >\n    @if (\n      treeView.showEmptyNodeMassage() &&\n      item().hasOwnProperty(treeView.childrenField()) &&\n      !item()[treeView.childrenField()]?.length\n    ) {\n      <ng-container [ngTemplateOutlet]=\"empty\"></ng-container>\n    } @else {\n      <ng-content></ng-content>\n    }\n  </div>\n}\n\n<ng-template #empty>\n  {{ '@acorex:common.general.no-result-found' | translate | async }}\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "directive", type: AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXTreeViewItemLegacyComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-tree-view-item-legacy', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXLoadingComponent, AXTooltipDirective, NgTemplateOutlet, AXTranslatorPipe, AsyncPipe], providers: [{ provide: AXComponent, useExisting: AXTreeViewItemLegacyComponent }], template: "<div class=\"ax-tree-view-container\">\n  @if (\n    (treeView.showEmptyNodeMassage() && item().hasOwnProperty(treeView.childrenField())) ||\n    (item()[this.treeView.childrenField()]?.length && !isLoading()) ||\n    (item()[treeView.hasChildField()] && !isLoading())\n  ) {\n    <div class=\"ax-tree-view-icon-container\" (click)=\"handleArrowNodeClick()\">\n      <i [class.ax-state-disabled]=\"item()[treeView.disableField()]\" class=\"{{ arrowIcon() }}\"></i>\n    </div>\n  } @else if (isLoading()) {\n    <ax-loading></ax-loading>\n  }\n  <div class=\"ax-tree-view-items\">\n    <ng-content select=\"ax-check-box\"></ng-content>\n    <div\n      [class.ax-state-disabled]=\"item()[treeView.disableField()]\"\n      [axTooltip]=\"item()[treeView.tooltipField()]\"\n      axTooltipPlacement=\"end-bottom\"\n      (click)=\"handleTextClick()\"\n      (dblclick)=\"handleTextDbClick()\"\n      class=\"ax-tree-view-items-prefix ax-noselect-tree-view\"\n      [class.ax-state-tree-view-active]=\"item()[treeView.activeField()]\"\n    >\n      @if (treeView.itemTemplate) {\n        <ng-container\n          [ngTemplateOutlet]=\"treeView.itemTemplate\"\n          [ngTemplateOutletContext]=\"{ $implicit: item() }\"\n        ></ng-container>\n      } @else {\n        <ng-content select=\"ax-prefix\"></ng-content>\n        <ng-content select=\"ax-text\"></ng-content>\n        <ng-content select=\"ax-suffix\"></ng-content>\n      }\n    </div>\n  </div>\n</div>\n\n@if (isExpanded()) {\n  <div\n    animate.enter=\"ax-fade-slide-in\"\n    animate.leave=\"ax-fade-slide-out\"\n    class=\"ax-tree-view-child\"\n    [class.ax-tree-view-empty-child]=\"\n      treeView.showEmptyNodeMassage() &&\n      item().hasOwnProperty(treeView.childrenField()) &&\n      !item()[treeView.childrenField()]?.length\n    \"\n  >\n    @if (\n      treeView.showEmptyNodeMassage() &&\n      item().hasOwnProperty(treeView.childrenField()) &&\n      !item()[treeView.childrenField()]?.length\n    ) {\n      <ng-container [ngTemplateOutlet]=\"empty\"></ng-container>\n    } @else {\n      <ng-content></ng-content>\n    }\n  </div>\n}\n\n<ng-template #empty>\n  {{ '@acorex:common.general.no-result-found' | translate | async }}\n</ng-template>\n" }]
        }], ctorParameters: () => [], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], isExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "isExpanded", required: false }] }, { type: i0.Output, args: ["isExpandedChange"] }], isActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "isActive", required: false }] }, { type: i0.Output, args: ["isActiveChange"] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], executorChanges: [{ type: i0.Input, args: [{ isSignal: true, alias: "executorChanges", required: false }] }] } });

class AXTreeViewLegacyComponent extends NXComponent {
    constructor() {
        super(...arguments);
        this.itemsSignal = signal([], ...(ngDevMode ? [{ debugName: "itemsSignal" }] : []));
        this.items = input(...(ngDevMode ? [undefined, { debugName: "items" }] : []));
        this.showCheckbox = input(true, ...(ngDevMode ? [{ debugName: "showCheckbox" }] : []));
        this.hasCheckboxField = input('hasCheckbox', ...(ngDevMode ? [{ debugName: "hasCheckboxField" }] : []));
        this.selectionMode = input('single', ...(ngDevMode ? [{ debugName: "selectionMode" }] : []));
        this.selectionBehavior = input(...(ngDevMode ? [undefined, { debugName: "selectionBehavior" }] : []));
        this.selectionScope = input('all', ...(ngDevMode ? [{ debugName: "selectionScope" }] : []));
        this.focusNodeEnabled = input(true, ...(ngDevMode ? [{ debugName: "focusNodeEnabled" }] : []));
        this.valueField = input('id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
        this.textField = input('text', ...(ngDevMode ? [{ debugName: "textField" }] : []));
        this.visibleField = input('visible', ...(ngDevMode ? [{ debugName: "visibleField" }] : []));
        this.disableField = input('disabled', ...(ngDevMode ? [{ debugName: "disableField" }] : []));
        this.hasChildField = input('hasChild', ...(ngDevMode ? [{ debugName: "hasChildField" }] : []));
        this.selectedField = input('selected', ...(ngDevMode ? [{ debugName: "selectedField" }] : []));
        this.expandedField = input('expanded', ...(ngDevMode ? [{ debugName: "expandedField" }] : []));
        this.tooltipField = input('tooltip', ...(ngDevMode ? [{ debugName: "tooltipField" }] : []));
        this.childrenField = input('children', ...(ngDevMode ? [{ debugName: "childrenField" }] : []));
        this.activeField = input('active', ...(ngDevMode ? [{ debugName: "activeField" }] : []));
        this.indeterminateField = input('indeterminate', ...(ngDevMode ? [{ debugName: "indeterminateField" }] : []));
        this.parentField = input('parentId', ...(ngDevMode ? [{ debugName: "parentField" }] : []));
        this.iconField = input('icon', ...(ngDevMode ? [{ debugName: "iconField" }] : []));
        this.toggleIcons = input(...(ngDevMode ? [undefined, { debugName: "toggleIcons" }] : []));
        this.look = input('defult', ...(ngDevMode ? [{ debugName: "look" }] : []));
        this.showEmptyNodeMassage = input(false, ...(ngDevMode ? [{ debugName: "showEmptyNodeMassage" }] : []));
        this.onSelectionChanged = output();
        this.onItemSelectedChanged = output();
        this.onNodeClick = output();
        this.onCollapsedChanged = output();
        this.onNodedbClick = output();
        this.executorChanges = signal(null, ...(ngDevMode ? [{ debugName: "executorChanges" }] : []));
        this.platformService = inject(AXPlatform);
        this.#effect = effect(() => {
            const itemsInput = this.items();
            if (typeof itemsInput === 'function') {
                const result = itemsInput();
                if (result instanceof Promise) {
                    this.itemsPromise = (options) => itemsInput(options);
                    this.fetchData();
                }
                else {
                    this.itemsSignal.set(result);
                    this.itemsPromise = null;
                }
            }
            else {
                this.itemsSignal.set(itemsInput);
                this.itemsPromise = null;
            }
        }, ...(ngDevMode ? [{ debugName: "#effect" }] : []));
        this.expandOn = input('defult', ...(ngDevMode ? [{ debugName: "expandOn" }] : []));
        this.loadingState = signal({}, ...(ngDevMode ? [{ debugName: "loadingState" }] : []));
    }
    /** @ignore */
    get __hostClass() {
        return [`ax-look-${this.look()}`];
    }
    get resolvedItems() {
        return this.itemsSignal();
    }
    #effect;
    handleNodeSelectionClick(event, item) {
        if (item[this.disableField()] || this.isNodeLoading(item[this.valueField()])) {
            return;
        }
        if (this.selectionMode() === 'single' && event.isUserInteraction) {
            this.handleUnSelectNode(this.itemsSignal());
        }
        if (event.isUserInteraction) {
            item[this.selectedField()] = event.value;
            if (event.value !== null) {
                switch (this.selectionBehavior()) {
                    case 'autoExpand':
                        if (event.value) {
                            if (this.itemsPromise && item[this.hasChildField()] && !item?.[this.childrenField()]?.length) {
                                this.setNodeLoading(item[this.valueField()], true);
                                this.fetchData(item);
                            }
                            this.toggleExpand(item);
                        }
                        break;
                    case 'cascade':
                        this.expandAndToggleSelection(item, event.value);
                        break;
                    case 'indeterminate':
                        if (item?.[this.childrenField()]?.length) {
                            this.applySelectionToChildren(item, event.value, item[this.valueField()]);
                        }
                        this.updateParentSelection(item, event.value);
                        break;
                    default:
                        break;
                }
            }
            this.onItemSelectedChanged.emit({
                component: this,
                data: item,
                nativeElement: this.nativeElement,
            });
            const result = this.findSelectedNodes(this.itemsSignal());
            this.onSelectionChanged.emit({
                component: this,
                data: result,
                nativeElement: this.nativeElement,
            });
        }
    }
    /**
     *
     * auto expand
     *
     */
    toggleExpand(item) {
        if (!item[this.expandedField()]) {
            item[this.expandedField()] = true;
        }
    }
    /**
     *
     * expand and change value parent change
     *
     */
    async expandAndToggleSelection(item, selected) {
        if (this.itemsPromise && item[this.hasChildField()] && !item?.[this.childrenField()]?.length) {
            await this.setNodeLoading(item[this.valueField()], true);
            await this.fetchData(item);
        }
        this.toggleExpand(item);
        if (item[this.childrenField()]?.length) {
            this.applySelectionToChildren(item, selected, item[this.valueField()]);
        }
    }
    applySelectionToChildren(item, isSelected, parentId) {
        item[this.childrenField()].forEach(async (child) => {
            if (this.itemsPromise &&
                child[this.hasChildField()] &&
                !child?.[this.childrenField()]?.length &&
                this.selectionBehavior() === 'cascade') {
                await this.setNodeLoading(child[this.valueField()], true);
                await this.fetchData(child);
                this.toggleExpand(child);
            }
            child[this.parentField()] = parentId;
            child[this.selectedField()] = isSelected;
            if (child[this.childrenField()]?.length) {
                this.applySelectionToChildren(child, isSelected, child[this.valueField()]);
            }
        });
    }
    /**
     *
     * indeterminate logic
     *
     */
    updateParentSelection(item, selected) {
        item[this.selectedField()] = selected;
        let parent = this.findParent(item, this.itemsSignal());
        while ((parent && parent[this.selectedField()] != false) || (parent && item[this.selectedField()])) {
            const allSelected = parent?.[this.childrenField()]?.every((child) => child[this.selectedField()]);
            const someSelected = parent?.[this.childrenField()]?.some((child) => child[this.selectedField()] || child[this.indeterminateField()]);
            if (!allSelected && !someSelected) {
                parent[this.selectedField()] = false;
                parent[this.indeterminateField()] = null;
            }
            else if (!allSelected) {
                parent[this.indeterminateField()] = true;
                parent[this.selectedField()] = null;
            }
            else if (allSelected) {
                parent[this.selectedField()] = true;
                parent[this.indeterminateField()] = false;
            }
            else {
                parent[this.indeterminateField()] = false;
                parent[this.selectedField()] = true;
            }
            parent = this.findParent(parent, this.itemsSignal());
        }
    }
    findParent(item, nodes) {
        for (const node of nodes) {
            if (node[this.childrenField()]?.includes(item)) {
                return node;
            }
            else if (node[this.childrenField()]) {
                const parent = this.findParent(item, node[this.childrenField()]);
                if (parent)
                    return parent;
            }
        }
        return null;
    }
    /**
     *
     * find node selected true for emit Selections
     *
     */
    findSelectedNodes(nodes) {
        let selectedNodes = [];
        nodes.forEach((node) => {
            if (node[this.selectedField()]) {
                selectedNodes.push(node);
            }
            if (node[this.childrenField()]) {
                selectedNodes = selectedNodes.concat(this.findSelectedNodes(node[this.childrenField()]));
            }
        });
        return selectedNodes;
    }
    /**
     *
     * find for emit Selections single mode
     *
     */
    handleUnSelectNode(items) {
        items.forEach((child) => {
            child[this.selectedField()] = false;
            if (child?.[this.childrenField()]?.length) {
                this.handleUnSelectNode(child[this.childrenField()]);
            }
        });
    }
    /**
     *
     * lazy load logic
     *
     */
    fetchData(selectedNode) {
        this.itemsPromise(selectedNode?.[this.valueField()])
            .then((data) => {
            if (Array.isArray(data)) {
                if (selectedNode?.[this.valueField()]) {
                    this.findNode(selectedNode[this.valueField()], data, this.itemsSignal());
                }
                else {
                    const isNodeExpanded = data.filter((child) => child[this.expandedField()]);
                    isNodeExpanded.forEach((child) => {
                        this.fetchData(child);
                    });
                    this.itemsSignal.set(data);
                }
            }
        })
            .finally(() => {
            this.setNodeLoading(selectedNode?.[this.valueField()], false);
        });
    }
    findNode(parentId, _children, source) {
        if (source.length) {
            source.forEach((element) => {
                if (element[this.valueField()] == parentId) {
                    if (this.selectionBehavior() === 'indeterminate' && element[this.selectedField()]) {
                        _children.forEach((child) => (child[this.selectedField()] = true));
                    }
                    element[this.childrenField()] = _children;
                }
                else {
                    if (element?.[this.childrenField()])
                        this.findNode(parentId, _children, element[this.childrenField()]);
                }
            });
        }
    }
    /**
     *
     * emit when arrow click
     *
     */
    handleNodeExpandClick(node) {
        const selectedNode = node.data;
        if (this.itemsPromise && node.data[this.expandedField()] && !node?.data[this.childrenField()]?.length) {
            this.setNodeLoading(selectedNode[this.valueField()], true);
            this.fetchData(selectedNode);
        }
        this.onCollapsedChanged.emit({ component: this, data: node.data, nativeElement: this.nativeElement });
    }
    handleUnActiveNode(unActiveSource) {
        unActiveSource.forEach((child) => {
            child[this.activeField()] = false;
            if (child?.[this.childrenField()]?.length) {
                this.handleUnActiveNode(child[this.childrenField()]);
            }
        });
    }
    isNodeLoading(nodeId) {
        return this.loadingState()[nodeId] || false;
    }
    setNodeLoading(nodeId, isLoading) {
        this.loadingState.update((state) => ({
            ...state,
            [nodeId]: isLoading,
        }));
    }
    executeOnTreeNode(node, operation, value) {
        switch (operation) {
            case 'active':
                node[this.activeField()] = value;
                break;
            case 'expand':
                node[this.expandedField()] = true;
                if (this.itemsPromise && node[this.hasChildField()] && !node[this.childrenField()]?.length) {
                    this.handleNodeExpandClick({ data: node, nativeElement: this.nativeElement, component: this });
                }
                break;
            case 'visible':
                node[this.visibleField()] = value;
                break;
            case 'disabled':
                node[this.disableField()] = value;
                break;
            default:
                break;
        }
        /**
         *
         * for detect changes treeviewitem
         *
         */
        this.executorChanges.set(operation);
    }
    refresh() {
        if (this.itemsPromise) {
            this.fetchData();
        }
    }
    async setNodeExpandAndChildren(valueFields, value) {
        const nodesToExpand = [];
        for (const valueField of valueFields) {
            const foundNodes = this.findNodesByValueField(this.itemsSignal(), valueField);
            nodesToExpand.push(...foundNodes);
        }
        await Promise.all(nodesToExpand.map((node) => this.expandNodeAndAllChildren(node, value)));
    }
    findNodesByValueField(nodes, valueField) {
        const results = [];
        for (const node of nodes) {
            if (node[this.valueField()] === valueField) {
                results.push(node);
            }
            if (node[this.childrenField()]?.length) {
                results.push(...this.findNodesByValueField(node[this.childrenField()], valueField));
            }
        }
        return results;
    }
    async expandNodeAndAllChildren(node, value) {
        node[this.expandedField()] = value;
        if (value && this.itemsPromise && node[this.hasChildField()] && !node[this.childrenField()]?.length) {
            await this.setNodeLoading(node[this.valueField()], true);
            await this.fetchData(node);
        }
        if (node[this.childrenField()]?.length) {
            await Promise.all(node[this.childrenField()].map((child) => this.expandNodeAndAllChildren(child, value)));
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXTreeViewLegacyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AXTreeViewLegacyComponent, isStandalone: true, selector: "ax-tree-view-legacy", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, showCheckbox: { classPropertyName: "showCheckbox", publicName: "showCheckbox", isSignal: true, isRequired: false, transformFunction: null }, hasCheckboxField: { classPropertyName: "hasCheckboxField", publicName: "hasCheckboxField", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selectionBehavior: { classPropertyName: "selectionBehavior", publicName: "selectionBehavior", isSignal: true, isRequired: false, transformFunction: null }, selectionScope: { classPropertyName: "selectionScope", publicName: "selectionScope", isSignal: true, isRequired: false, transformFunction: null }, focusNodeEnabled: { classPropertyName: "focusNodeEnabled", publicName: "focusNodeEnabled", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, visibleField: { classPropertyName: "visibleField", publicName: "visibleField", isSignal: true, isRequired: false, transformFunction: null }, disableField: { classPropertyName: "disableField", publicName: "disableField", isSignal: true, isRequired: false, transformFunction: null }, hasChildField: { classPropertyName: "hasChildField", publicName: "hasChildField", isSignal: true, isRequired: false, transformFunction: null }, selectedField: { classPropertyName: "selectedField", publicName: "selectedField", isSignal: true, isRequired: false, transformFunction: null }, expandedField: { classPropertyName: "expandedField", publicName: "expandedField", isSignal: true, isRequired: false, transformFunction: null }, tooltipField: { classPropertyName: "tooltipField", publicName: "tooltipField", isSignal: true, isRequired: false, transformFunction: null }, childrenField: { classPropertyName: "childrenField", publicName: "childrenField", isSignal: true, isRequired: false, transformFunction: null }, activeField: { classPropertyName: "activeField", publicName: "activeField", isSignal: true, isRequired: false, transformFunction: null }, indeterminateField: { classPropertyName: "indeterminateField", publicName: "indeterminateField", isSignal: true, isRequired: false, transformFunction: null }, parentField: { classPropertyName: "parentField", publicName: "parentField", isSignal: true, isRequired: false, transformFunction: null }, iconField: { classPropertyName: "iconField", publicName: "iconField", isSignal: true, isRequired: false, transformFunction: null }, toggleIcons: { classPropertyName: "toggleIcons", publicName: "toggleIcons", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, showEmptyNodeMassage: { classPropertyName: "showEmptyNodeMassage", publicName: "showEmptyNodeMassage", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: false, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: false, isRequired: false, transformFunction: null }, expandOn: { classPropertyName: "expandOn", publicName: "expandOn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelectionChanged: "onSelectionChanged", onItemSelectedChanged: "onItemSelectedChanged", onNodeClick: "onNodeClick", onCollapsedChanged: "onCollapsedChanged", onNodedbClick: "onNodedbClick" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
            { provide: AXComponent, useExisting: AXTreeViewLegacyComponent },
            { provide: AXTreeViewBaseLegacy, useExisting: AXTreeViewLegacyComponent },
        ], usesInheritance: true, ngImport: i0, template: "@if (resolvedItems?.length) {\n  @for (node of resolvedItems; track $index) {\n    <ng-container [ngTemplateOutlet]=\"recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"></ng-container>\n  }\n} @else {\n  <ng-container [ngTemplateOutlet]=\"emptyTemplate || empty\"></ng-container>\n}\n\n<ng-template #recursion let-item>\n  @if (item[visibleField()] !== false) {\n    <ax-tree-view-item-legacy\n      [item]=\"item\"\n      [isExpanded]=\"item[expandedField()]\"\n      [(isActive)]=\"item[activeField()]\"\n      [isLoading]=\"isNodeLoading(item[valueField()])\"\n      [executorChanges]=\"executorChanges()\"\n    >\n      @if (\n        (showCheckbox() && selectionScope() === 'all' && item[hasCheckboxField()] !== false) ||\n        (showCheckbox() &&\n          selectionScope() === 'parent' &&\n          item[childrenField()]?.length &&\n          item[hasCheckboxField()]) !== false ||\n        (showCheckbox() &&\n          selectionScope() === 'children' &&\n          !item[childrenField()]?.length &&\n          item[hasCheckboxField()] !== false)\n      ) {\n        <ax-check-box\n          [disabled]=\"item[disableField()]\"\n          [indeterminate]=\"item[indeterminateField()]\"\n          [(ngModel)]=\"item[selectedField()]\"\n          (onValueChanged)=\"handleNodeSelectionClick($event, item)\"\n        ></ax-check-box>\n      }\n      @if (item[iconField()]) {\n        <ax-prefix>\n          <ax-icon [icon]=\"item[iconField()]\"></ax-icon>\n        </ax-prefix>\n      }\n      @if (item[textField()]) {\n        <ax-text>{{ item[textField()] }}</ax-text>\n      }\n\n      @for (child of item?.[childrenField()]; track $index) {\n        <ng-container [ngTemplateOutlet]=\"recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n      }\n    </ax-tree-view-item-legacy>\n  }\n</ng-template>\n\n<ng-template #empty>\n  {{ '@acorex:common.general.no-result-found' | translate | async }}\n</ng-template>\n\n\n", styles: ["ax-tree-view-legacy{--ax-comp-tree-view-arrow-size: .875rem;--ax-comp-tree-view-text-size: .875rem;--ax-comp-tree-view-active-bg-color: var(--ax-sys-color-primary-surface);--ax-comp-tree-view-active-text-color: var(--ax-sys-color-on-primary-surface);--ax-comp-tree-view-hover-bg-color: var(--ax-sys-color-dark-surface);--ax-comp-tree-view-indicator-size: 2px}ax-tree-view-legacy:has(>ax-tree-view-item-legacy i) ax-tree-view-item-legacy .ax-tree-view-container:not(:has(i)){padding-inline-start:1.5rem}ax-tree-view-legacy.ax-look-with-line ax-tree-view-item-legacy{position:relative}ax-tree-view-legacy.ax-look-with-line ax-tree-view-item-legacy:before{content:\"\";position:absolute;top:0;inset-inline-start:.625rem;width:1px;height:100%;background-color:#ccc}ax-tree-view-legacy.ax-look-with-line ax-tree-view-item-legacy .ax-tree-view-container{padding-inline-start:1.25rem}ax-tree-view-legacy.ax-look-with-line ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-icon-container{padding:.25rem}ax-tree-view-legacy ax-tree-view-item-legacy ax-check-box{margin-inline-start:.5rem}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container{display:flex;align-items:center;margin-bottom:.125rem}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container ax-text{font-size:var(--ax-comp-tree-view-text-size)}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container{cursor:pointer}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-checkbox-end-side{display:none!important}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-arrow{font-size:var(--ax-comp-tree-view-arrow-size)!important}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container ax-suffix:empty{display:none}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-icon-container{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-items{display:flex;align-items:center}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-items .ax-tree-view-items-prefix{display:flex;align-items:center;gap:.5rem;padding:.25rem .5rem;border-radius:.25rem;overflow-x:auto;margin-inline-start:.25rem}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-items .ax-tree-view-items-prefix.ax-noselect-tree-view{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-items .ax-tree-view-items-prefix.ax-state-tree-view-active{background-color:rgba(var(--ax-comp-tree-view-active-bg-color));color:rgba(var(--ax-comp-tree-view-active-text-color))}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-items .ax-tree-view-items-prefix:hover:not(.ax-state-tree-view-active){background-color:rgba(var(--ax-comp-tree-view-hover-bg-color))}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-child{padding-inline-start:1rem}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-child .ax-tree-view-container:not(:has(.ax-tree-view-icon-container i)){padding-inline-start:1.5rem}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-child.ax-tree-view-empty-child{padding-inline-start:2rem}ax-tree-view-legacy ax-tree-view-item-legacy .ax-state-disabled{cursor:not-allowed!important;opacity:.5!important}@keyframes fadeSlideIn{0%{opacity:0;max-height:0}to{opacity:1;max-height:50px}}@keyframes fadeSlideOut{0%{opacity:1;max-height:50px}to{opacity:0;max-height:0}}ax-tree-view-legacy ax-tree-view-item-legacy .ax-fade-slide-in{animation:fadeSlideIn var(--ax-sys-transition-duration) var(--ax-sys-transition-timing-function)}ax-tree-view-legacy ax-tree-view-item-legacy .ax-fade-slide-out{animation:fadeSlideOut var(--ax-sys-transition-duration) var(--ax-sys-transition-timing-function)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXTreeViewItemLegacyComponent, selector: "ax-tree-view-item-legacy", inputs: ["item", "isExpanded", "isActive", "isLoading", "executorChanges"], outputs: ["isExpandedChange", "isActiveChange"] }, { kind: "component", type: AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXTreeViewLegacyComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-tree-view-legacy', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
                        NgTemplateOutlet,
                        AXTreeViewItemLegacyComponent,
                        AXCheckBoxComponent,
                        FormsModule,
                        AXDecoratorGenericComponent,
                        AXDecoratorIconComponent,
                        AXTranslatorPipe,
                        AsyncPipe,
                    ], providers: [
                        { provide: AXComponent, useExisting: AXTreeViewLegacyComponent },
                        { provide: AXTreeViewBaseLegacy, useExisting: AXTreeViewLegacyComponent },
                    ], template: "@if (resolvedItems?.length) {\n  @for (node of resolvedItems; track $index) {\n    <ng-container [ngTemplateOutlet]=\"recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"></ng-container>\n  }\n} @else {\n  <ng-container [ngTemplateOutlet]=\"emptyTemplate || empty\"></ng-container>\n}\n\n<ng-template #recursion let-item>\n  @if (item[visibleField()] !== false) {\n    <ax-tree-view-item-legacy\n      [item]=\"item\"\n      [isExpanded]=\"item[expandedField()]\"\n      [(isActive)]=\"item[activeField()]\"\n      [isLoading]=\"isNodeLoading(item[valueField()])\"\n      [executorChanges]=\"executorChanges()\"\n    >\n      @if (\n        (showCheckbox() && selectionScope() === 'all' && item[hasCheckboxField()] !== false) ||\n        (showCheckbox() &&\n          selectionScope() === 'parent' &&\n          item[childrenField()]?.length &&\n          item[hasCheckboxField()]) !== false ||\n        (showCheckbox() &&\n          selectionScope() === 'children' &&\n          !item[childrenField()]?.length &&\n          item[hasCheckboxField()] !== false)\n      ) {\n        <ax-check-box\n          [disabled]=\"item[disableField()]\"\n          [indeterminate]=\"item[indeterminateField()]\"\n          [(ngModel)]=\"item[selectedField()]\"\n          (onValueChanged)=\"handleNodeSelectionClick($event, item)\"\n        ></ax-check-box>\n      }\n      @if (item[iconField()]) {\n        <ax-prefix>\n          <ax-icon [icon]=\"item[iconField()]\"></ax-icon>\n        </ax-prefix>\n      }\n      @if (item[textField()]) {\n        <ax-text>{{ item[textField()] }}</ax-text>\n      }\n\n      @for (child of item?.[childrenField()]; track $index) {\n        <ng-container [ngTemplateOutlet]=\"recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n      }\n    </ax-tree-view-item-legacy>\n  }\n</ng-template>\n\n<ng-template #empty>\n  {{ '@acorex:common.general.no-result-found' | translate | async }}\n</ng-template>\n\n\n", styles: ["ax-tree-view-legacy{--ax-comp-tree-view-arrow-size: .875rem;--ax-comp-tree-view-text-size: .875rem;--ax-comp-tree-view-active-bg-color: var(--ax-sys-color-primary-surface);--ax-comp-tree-view-active-text-color: var(--ax-sys-color-on-primary-surface);--ax-comp-tree-view-hover-bg-color: var(--ax-sys-color-dark-surface);--ax-comp-tree-view-indicator-size: 2px}ax-tree-view-legacy:has(>ax-tree-view-item-legacy i) ax-tree-view-item-legacy .ax-tree-view-container:not(:has(i)){padding-inline-start:1.5rem}ax-tree-view-legacy.ax-look-with-line ax-tree-view-item-legacy{position:relative}ax-tree-view-legacy.ax-look-with-line ax-tree-view-item-legacy:before{content:\"\";position:absolute;top:0;inset-inline-start:.625rem;width:1px;height:100%;background-color:#ccc}ax-tree-view-legacy.ax-look-with-line ax-tree-view-item-legacy .ax-tree-view-container{padding-inline-start:1.25rem}ax-tree-view-legacy.ax-look-with-line ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-icon-container{padding:.25rem}ax-tree-view-legacy ax-tree-view-item-legacy ax-check-box{margin-inline-start:.5rem}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container{display:flex;align-items:center;margin-bottom:.125rem}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container ax-text{font-size:var(--ax-comp-tree-view-text-size)}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container{cursor:pointer}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-checkbox-end-side{display:none!important}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-arrow{font-size:var(--ax-comp-tree-view-arrow-size)!important}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container ax-suffix:empty{display:none}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-icon-container{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-items{display:flex;align-items:center}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-items .ax-tree-view-items-prefix{display:flex;align-items:center;gap:.5rem;padding:.25rem .5rem;border-radius:.25rem;overflow-x:auto;margin-inline-start:.25rem}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-items .ax-tree-view-items-prefix.ax-noselect-tree-view{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-items .ax-tree-view-items-prefix.ax-state-tree-view-active{background-color:rgba(var(--ax-comp-tree-view-active-bg-color));color:rgba(var(--ax-comp-tree-view-active-text-color))}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-container .ax-tree-view-items .ax-tree-view-items-prefix:hover:not(.ax-state-tree-view-active){background-color:rgba(var(--ax-comp-tree-view-hover-bg-color))}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-child{padding-inline-start:1rem}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-child .ax-tree-view-container:not(:has(.ax-tree-view-icon-container i)){padding-inline-start:1.5rem}ax-tree-view-legacy ax-tree-view-item-legacy .ax-tree-view-child.ax-tree-view-empty-child{padding-inline-start:2rem}ax-tree-view-legacy ax-tree-view-item-legacy .ax-state-disabled{cursor:not-allowed!important;opacity:.5!important}@keyframes fadeSlideIn{0%{opacity:0;max-height:0}to{opacity:1;max-height:50px}}@keyframes fadeSlideOut{0%{opacity:1;max-height:50px}to{opacity:0;max-height:0}}ax-tree-view-legacy ax-tree-view-item-legacy .ax-fade-slide-in{animation:fadeSlideIn var(--ax-sys-transition-duration) var(--ax-sys-transition-timing-function)}ax-tree-view-legacy ax-tree-view-item-legacy .ax-fade-slide-out{animation:fadeSlideOut var(--ax-sys-transition-duration) var(--ax-sys-transition-timing-function)}\n"] }]
        }], propDecorators: { __hostClass: [{
                type: HostBinding,
                args: ['class']
            }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], showCheckbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCheckbox", required: false }] }], hasCheckboxField: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasCheckboxField", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], selectionBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionBehavior", required: false }] }], selectionScope: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionScope", required: false }] }], focusNodeEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusNodeEnabled", required: false }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: false }] }], textField: [{ type: i0.Input, args: [{ isSignal: true, alias: "textField", required: false }] }], visibleField: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibleField", required: false }] }], disableField: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableField", required: false }] }], hasChildField: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasChildField", required: false }] }], selectedField: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedField", required: false }] }], expandedField: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedField", required: false }] }], tooltipField: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipField", required: false }] }], childrenField: [{ type: i0.Input, args: [{ isSignal: true, alias: "childrenField", required: false }] }], activeField: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeField", required: false }] }], indeterminateField: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminateField", required: false }] }], parentField: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentField", required: false }] }], iconField: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconField", required: false }] }], toggleIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleIcons", required: false }] }], look: [{ type: i0.Input, args: [{ isSignal: true, alias: "look", required: false }] }], showEmptyNodeMassage: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEmptyNodeMassage", required: false }] }], onSelectionChanged: [{ type: i0.Output, args: ["onSelectionChanged"] }], onItemSelectedChanged: [{ type: i0.Output, args: ["onItemSelectedChanged"] }], onNodeClick: [{ type: i0.Output, args: ["onNodeClick"] }], onCollapsedChanged: [{ type: i0.Output, args: ["onCollapsedChanged"] }], onNodedbClick: [{ type: i0.Output, args: ["onNodedbClick"] }], itemTemplate: [{
                type: Input
            }], emptyTemplate: [{
                type: Input
            }], expandOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandOn", required: false }] }] } });

const COMPONENT = [AXTreeViewLegacyComponent, AXTreeViewItemLegacyComponent];
const MODULES = [
    CommonModule,
    AXCommonModule,
    AXDecoratorModule,
    AXCheckBoxModule,
    AXFormModule,
    FormsModule,
    AXTooltipModule,
    AXLoadingModule,
];
class AXTreeViewLegacyModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXTreeViewLegacyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: AXTreeViewLegacyModule, imports: [AXTreeViewLegacyComponent, AXTreeViewItemLegacyComponent, CommonModule,
            AXCommonModule,
            AXDecoratorModule,
            AXCheckBoxModule,
            AXFormModule,
            FormsModule,
            AXTooltipModule,
            AXLoadingModule], exports: [AXTreeViewLegacyComponent, AXTreeViewItemLegacyComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXTreeViewLegacyModule, imports: [COMPONENT, MODULES] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXTreeViewLegacyModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [...COMPONENT, ...MODULES],
                    exports: [...COMPONENT],
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { AXTreeItemClickBaseEventLegacy, AXTreeViewBaseLegacy, AXTreeViewItemLegacyComponent, AXTreeViewLegacyComponent, AXTreeViewLegacyModule };
//# sourceMappingURL=acorex-components-tree-view-legacy.mjs.map
