var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Component, ViewEncapsulation, NgModule, Injector, ElementRef, Optional, Inject, forwardRef, ViewChild, EventEmitter, ViewChildren, QueryList } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Router, ActivatedRoute, RouterModule } from '@angular/router';
import { TreeModule, TreeComponent } from 'ng2-tree';
import { OntimizeWebModule, InputConverter, Util, OSharedModule, ServiceUtils, OServiceBaseComponent, Codes, OFormComponent, FilterExpressionUtils, OSearchInputModule, OntimizeService, dataServiceFactory, OTranslateService, OSearchInputComponent } from 'ontimize-web-ngx';
export var DEFAULT_BASIC_INPUTS_O_TREE = OServiceBaseComponent.DEFAULT_INPUTS_O_SERVICE_BASE_COMPONENT.concat([
    'sortColumns: sort-columns',
    'descriptionColumns: description-columns',
    'separator',
    'parentColumn: parent-column',
    'showRoot: show-root',
    'rootTitle: root-title',
    'recursive',
    'recursiveLevels: recursive-levels',
    'translate',
    'route'
]);
export var DEFAULT_INPUTS_O_TREE = DEFAULT_BASIC_INPUTS_O_TREE.concat([
    'oTitle: title',
    'controls',
    'refreshButton: refresh-button',
    'quickFilter: quick-filter',
    'quickFilterColumns: quick-filter-columns',
    'filterCaseSensitive: filter-case-sensitive'
]);
export var DEFAULT_OUTPUTS_O_TREE = [
    'onNodeSelected',
    'onNodeExpanded',
    'onNodeCollapsed',
    'onLoadNextLevel'
];
var ɵ0 = dataServiceFactory;
var OTreeComponent = (function (_super) {
    __extends(OTreeComponent, _super);
    function OTreeComponent(injector, elRef, form) {
        var _this = _super.call(this, injector) || this;
        _this.elRef = elRef;
        _this.form = form;
        _this.separator = Codes.HYPHEN_SEPARATOR;
        _this.showRoot = true;
        _this.recursive = false;
        _this.recursiveLevels = 1;
        _this.translate = false;
        _this.controls = true;
        _this.static = true;
        _this.rightMenu = false;
        _this.refreshButton = true;
        _this.quickFilter = false;
        _this.filterCaseSensitive = false;
        _this.sortColArray = [];
        _this.descriptionColArray = [];
        _this.dataResponseArray = [];
        _this.expandedNodesIds = [];
        _this.treeNodes = [];
        _this.onNodeSelected = new EventEmitter();
        _this.onNodeExpanded = new EventEmitter();
        _this.onNodeCollapsed = new EventEmitter();
        _this.onLoadNextLevel = new EventEmitter();
        _this.filteringTree = false;
        _this.resetingTree = false;
        _this.router = _this.injector.get(Router);
        _this.actRoute = _this.injector.get(ActivatedRoute);
        _this.translateService = _this.injector.get(OTranslateService);
        return _this;
    }
    OTreeComponent.prototype.getComponentKey = function () {
        return 'OTreeComponent_' + this.oattr;
    };
    OTreeComponent.prototype.getDataToStore = function () {
        var dataToStore = {};
        return dataToStore;
    };
    OTreeComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.initialize();
        this.onLanguageChangeSubscription = this.translateService.onLanguageChanged.subscribe(function () {
            _this.onLanguageChangeCallback();
        });
    };
    OTreeComponent.prototype.ngAfterViewInit = function () {
        if (this.elRef) {
            this.elRef.nativeElement.removeAttribute('title');
        }
        if (this.queryOnInit) {
            this.queryData();
        }
    };
    OTreeComponent.prototype.ngOnDestroy = function () {
        _super.prototype.destroy.call(this);
        if (this.onLanguageChangeSubscription) {
            this.onLanguageChangeSubscription.unsubscribe();
        }
    };
    OTreeComponent.prototype.ngOnChanges = function (changes) {
        if (Util.isDefined(this.rootTreeModel) && Util.isDefined(this.treeComponent)) {
            _super.prototype.ngOnChanges.call(this, changes);
        }
    };
    OTreeComponent.prototype.initialize = function () {
        this.sortColArray = ServiceUtils.parseSortColumns(this.sortColumns);
        this.descriptionColArray = Util.parseArray(this.descriptionColumns, true);
        _super.prototype.initialize.call(this);
        if (this.quickFilterColumns) {
            this.quickFilterColArray = Util.parseArray(this.quickFilterColumns, true);
        }
        else {
            this.quickFilterColArray = this.colArray;
        }
    };
    OTreeComponent.prototype.onLanguageChangeCallback = function () {
        this.translating = true;
        this.treeComponent.getController().rename(this.translateService.get(this.rootTitle));
        this.translateChildren(this.rootTreeModel);
        this.translating = false;
    };
    OTreeComponent.prototype.translateChildren = function (treeModel) {
        var self = this;
        treeModel.children.forEach(function (child) {
            var controller = self.treeComponent.getControllerByNodeId(child.id);
            if (controller) {
                var innerTreeModel = controller.toTreeModel();
                if (innerTreeModel) {
                    var comp = innerTreeModel.treeNodeComponent;
                    if (comp) {
                        if (innerTreeModel.loadChildren && (comp.showRoot || comp.forcedShowRoot)) {
                            controller.rename(self.translateService.get(comp.rootTitle));
                        }
                        else if (!innerTreeModel.loadChildren && comp.translate) {
                            controller.rename(comp.getNodeDescription(innerTreeModel.data));
                        }
                    }
                    if (controller.isExpanded()) {
                        if (innerTreeModel.children && innerTreeModel.children.length) {
                            self.translateChildren(innerTreeModel);
                        }
                    }
                }
            }
        });
    };
    OTreeComponent.prototype.setDataArray = function (data) {
        _super.prototype.setDataArray.call(this, data);
        this.setData(this.dataArray);
    };
    OTreeComponent.prototype.registerTreeNode = function (oTreeNode) {
        this.treeNodes.push(oTreeNode);
    };
    OTreeComponent.prototype.getComponentFilter = function (existingFilter) {
        if (existingFilter === void 0) { existingFilter = {}; }
        var filter = existingFilter;
        if (this.recursive && this.parentColumn !== undefined) {
            var parentItemExpr = FilterExpressionUtils.buildExpressionFromObject(filter);
            var parentNotNullExpr = FilterExpressionUtils.buildExpressionIsNull(this.parentColumn);
            var filterExpr = FilterExpressionUtils.buildComplexExpression(parentItemExpr, parentNotNullExpr, FilterExpressionUtils.OP_AND);
            filter = {};
            filter[FilterExpressionUtils.FILTER_EXPRESSION_KEY] = filterExpr;
        }
        return filter;
    };
    OTreeComponent.prototype.getRecursiveChildren = function (id, callback) {
        var queryMethodName = this.queryMethod;
        if (!this.dataService || !(queryMethodName in this.dataService) || !this.entity) {
            return;
        }
        var parentItem = ServiceUtils.getParentKeysFromForm(this._pKeysEquiv, this.form);
        var filter = (parentItem !== undefined) ? parentItem : {};
        filter[this.parentColumn] = id;
        var queryArguments = [filter, this.colArray, this.entity];
        this.doChildQuery(queryMethodName, queryArguments, callback);
    };
    OTreeComponent.prototype.getTreeNodesChildren = function (itemdata, callback) {
        var _this = this;
        var children = [];
        this.treeNodes.forEach(function (childNode) {
            var treeNode = {
                data: itemdata,
                route: _this.route,
                value: _this.translateService.get(childNode.rootTitle),
                id: childNode.oattr,
                treeNodeComponent: childNode,
                emitLoadNextLevel: false,
                loadChildren: function (childNodeCallback) {
                    var queryMethodName = childNode.queryMethod;
                    if (!childNode.dataService || !(queryMethodName in childNode.dataService) || !childNode.entity) {
                        return;
                    }
                    var filter = ServiceUtils.getFilterUsingParentKeys(itemdata, childNode._pKeysEquiv);
                    var queryArguments = [filter, childNode.colArray, childNode.entity];
                    childNode.doChildQuery(queryMethodName, queryArguments, childNodeCallback);
                }
            };
            children.push(treeNode);
        });
        if (this.treeNodes.length === 1 && !this.treeNodes[0].showRoot) {
            children[0].loadChildren(callback);
        }
        else {
            this.treeNodes.forEach(function (childNode) {
                childNode.forcedShowRoot = true;
            });
            callback(children);
        }
    };
    OTreeComponent.prototype.doChildQuery = function (queryMethodName, queryArguments, callback) {
        var _this = this;
        var self = this;
        this.dataService[queryMethodName].apply(this.dataService, queryArguments).subscribe(function (resp) {
            var children = [];
            if (resp && resp.data && resp.data.length > 0) {
                for (var i = 0, len = resp.data.length; i < len; i++) {
                    var child = _this.mapTreeNode(resp.data[i], self);
                    children.push(child);
                }
            }
            callback(children);
        });
    };
    OTreeComponent.prototype.mapTreeNode = function (itemdata, treeNodeComponent) {
        var _this = this;
        if (itemdata === void 0) { itemdata = {}; }
        var treeNode = {
            data: itemdata,
            value: this.getNodeDescription(itemdata),
            id: this.getNodeId(itemdata),
            route: this.route,
            treeNodeComponent: treeNodeComponent
        };
        if (this.recursive) {
            treeNode['loadChildren'] = function (callback) { return _this.getRecursiveChildren(itemdata[_this.keysArray[0]], callback); };
        }
        else if (this.treeNodes.length > 0) {
            treeNode['loadChildren'] = function (callback) { return _this.getTreeNodesChildren(itemdata, callback); };
        }
        return treeNode;
    };
    OTreeComponent.prototype.getNodeId = function (item) {
        if (item === void 0) { item = {}; }
        var id = '';
        this.keysArray.forEach(function (key) {
            id += item[key];
        });
        return this.keys + ':' + id;
    };
    OTreeComponent.prototype.getNodeDescription = function (item) {
        if (item === void 0) { item = {}; }
        var descTxt = '';
        var self = this;
        this.descriptionColArray.forEach(function (col, index) {
            var txt = item[col];
            if (txt) {
                if (self.translate && self.translateService) {
                    txt = self.translateService.get(txt);
                }
                descTxt += txt;
            }
            if (index < self.descriptionColArray.length - 1) {
                descTxt += self.separator;
            }
        });
        return descTxt;
    };
    OTreeComponent.prototype.reloadData = function () {
        this.queryData();
        if (this.searchInput.length === 1) {
            var filter = this.searchInput.first.getValue();
            if (filter && filter.length > 1) {
                this.onSearch(filter);
            }
        }
    };
    OTreeComponent.prototype.setData = function (treeArray) {
        var _this = this;
        this.dataResponseArray = treeArray;
        var childrenArray = [];
        treeArray.forEach(function (el) {
            childrenArray.push(_this.mapTreeNode(el));
        });
        this.rootTreeModel = {
            value: this.translateService.get(this.rootTitle),
            id: 0,
            children: childrenArray,
            settings: {
                rightMenu: this.rightMenu,
                static: this.static,
                cssClasses: {
                    expanded: 'material-icons expanded-node',
                    collapsed: 'material-icons collapsed-node'
                }
            }
        };
        this.settings = {
            rootIsVisible: this.showRoot
        };
    };
    OTreeComponent.prototype.resetTree = function () {
        this.resetingTree = true;
        this.setData(this.dataResponseArray);
        var self = this;
        setTimeout(function () {
            self.expandedNodesIds.forEach(function (id, index) {
                setTimeout(function () {
                    var controller = self.treeComponent.getControllerByNodeId(id);
                    if (controller) {
                        controller.expand();
                    }
                }, index * 75);
            });
        }, 0);
    };
    OTreeComponent.prototype.onSearch = function (textValue) {
        if (this.pageable) {
            return;
        }
        this.resetTree();
        var self = this;
        setTimeout(function () {
            if (textValue && textValue.length > 0) {
                setTimeout(function () {
                    self.filterTreeUsingFilter(textValue);
                    self.resetingTree = false;
                }, (self.expandedNodesIds.length + 1) * 75);
            }
            else {
                self.resetingTree = false;
            }
        }, 75);
    };
    OTreeComponent.prototype.nodeSelected = function (event) {
        if (event && event.node && Util.isDefined(event.node.id)) {
            var node = event.node;
            var controller = this.treeComponent.getControllerByNodeId(node.id);
            if (controller) {
                var innerTreeModel = controller.toTreeModel();
                if (innerTreeModel && innerTreeModel.treeNodeComponent) {
                    var nodeModel_1 = innerTreeModel.data;
                    innerTreeModel.treeNodeComponent.innerNodeSelected(nodeModel_1, node);
                    return;
                }
            }
            var nodeModel = node.node ? node.node.data : node;
            this.innerNodeSelected(nodeModel, node);
        }
    };
    OTreeComponent.prototype.innerNodeSelected = function (data, node) {
        this.onNodeSelected.emit(data);
        this.selectedNode = node;
        if (Util.isDefined(node.node.route) || (node.id === 0)) {
            var route = undefined;
            if (node.id === 0) {
            }
            else {
                var nodeRoute = node.node.route;
                var routeArray = nodeRoute.split(Codes.ROUTE_SEPARATOR);
                for (var i = 0, len = routeArray.length; i < len; i++) {
                    if (routeArray[i].startsWith(Codes.ROUTE_VARIABLE_CHAR)) {
                        routeArray[i] = data[routeArray[i].substring(1)];
                    }
                }
                route = routeArray.join(Codes.ROUTE_SEPARATOR);
            }
            if (Util.isDefined(route)) {
                var extras = {
                    relativeTo: this.actRoute
                };
                this.router.navigate([route], extras);
            }
        }
    };
    OTreeComponent.prototype.nodeMoved = function (event) {
        if (event && event.node && event.node.id) {
        }
    };
    OTreeComponent.prototype.nodeCreated = function (event) {
        console.log(event);
    };
    OTreeComponent.prototype.nodeRemoved = function (event) {
        if (!this.filteringTree) {
            console.log(event);
        }
    };
    OTreeComponent.prototype.nodeRenamed = function (event) {
        if (!this.translating) {
            console.log(event);
        }
    };
    OTreeComponent.prototype.nodeExpanded = function (event) {
        if (!this.resetingTree && event && event.node && event.node.id) {
            var node = event.node;
            if (this.expandedNodesIds.indexOf(node.id) === -1) {
                this.expandedNodesIds.push(node.id);
            }
            this.onNodeExpanded.emit(node);
        }
    };
    OTreeComponent.prototype.nodeCollapsed = function (event) {
        if (event && event.node && event.node.id) {
            var node = event.node;
            this.expandedNodesIds.splice(this.expandedNodesIds.indexOf(node.id), 1);
            this.onNodeCollapsed.emit(node);
        }
    };
    OTreeComponent.prototype.nextLevelLoaded = function (event) {
        if (event && event.node && event.node.id) {
            var node = event.node;
            this.onLoadNextLevel.emit(node);
        }
    };
    OTreeComponent.prototype.executeNodeActionById = function (id, action) {
        var treeController = this.treeComponent.getControllerByNodeId(id);
        if (treeController && typeof treeController[action] === 'function') {
            treeController[action]();
        }
        else {
            console.log('There isn`t a controller for a node with id - ' + id);
        }
    };
    OTreeComponent.prototype.hasTitle = function () {
        return this.oTitle !== undefined;
    };
    OTreeComponent.prototype.useQuickFilter = function () {
        return this.quickFilter;
    };
    OTreeComponent.prototype.filterTreeUsingFilter = function (filter) {
        var _this = this;
        this.filteringTree = true;
        if (!this.filterCaseSensitive) {
            filter = filter.toLowerCase();
        }
        this.rootTreeModel.children.forEach(function (item) {
            _this.filterNodesUsingFilter(item, filter);
        });
        this.filteringTree = false;
    };
    OTreeComponent.prototype.filterNodesUsingFilter = function (item, filter) {
        var controller = this.treeComponent.getControllerByNodeId(item.id);
        if (controller && controller.isExpanded()) {
            this.filterBranch(item, filter);
        }
        else if (controller) {
            this.filterLeaf(item, filter);
        }
    };
    OTreeComponent.prototype.filterBranch = function (item, filter) {
        var _this = this;
        var controller = this.treeComponent.getControllerByNodeId(item.id);
        var children = controller.toTreeModel().children;
        children.forEach(function (child) {
            _this.filterNodesUsingFilter(child, filter);
        });
        var notNullChildren = children.filter(function (child) {
            return Util.isDefined(_this.treeComponent.getControllerByNodeId(child.id));
        });
        if (notNullChildren.length === 0) {
            this.filterLeaf(item, filter);
        }
    };
    OTreeComponent.prototype.filterLeaf = function (item, filter) {
        var searchStr = this.getStringForSearch(item);
        if (!this.filterCaseSensitive) {
            searchStr = searchStr.toLowerCase();
        }
        var remove = searchStr.indexOf(filter) === -1;
        if (remove) {
            var treeController = this.treeComponent.getControllerByNodeId(item.id);
            if (treeController) {
                treeController.remove();
            }
        }
    };
    OTreeComponent.prototype.getStringForSearch = function (item) {
        var resultArr = [];
        var columns = item.treeNodeComponent ? item.treeNodeComponent.quickFilterColArray : this.quickFilterColArray;
        resultArr = columns.map(function (col) {
            return item.data[col];
        });
        if (Util.isDefined(item.loadChildren)) {
            resultArr.push(item.value);
        }
        return resultArr.join(' ');
    };
    OTreeComponent.DEFAULT_INPUTS_O_TREE = DEFAULT_INPUTS_O_TREE;
    OTreeComponent.DEFAULT_BASIC_INPUTS_O_TREE = DEFAULT_BASIC_INPUTS_O_TREE;
    OTreeComponent.DEFAULT_OUTPUTS_O_TREE = DEFAULT_OUTPUTS_O_TREE;
    OTreeComponent.DEFAULT_ROOT_ROUTE = 'home';
    OTreeComponent.decorators = [
        { type: Component, args: [{
                    selector: 'o-tree',
                    template: "\n    <div fxLayout=\"column\" class=\"tree-container\" fxFlex [class.has-controls]=\"controls\">\n      <mat-toolbar *ngIf=\"controls\" class=\"toolbar\" fxLayoutAlign=\"space-between center\">\n        <div class=\"mat-toolbar-tools\" fxLayout=\"row\" fxFill fxLayoutAlign=\"start center\">\n          <button type=\"button\" mat-icon-button aria-label=\"Refresh\" (click)=\"reloadData()\" *ngIf=\"refreshButton\">\n            <mat-icon>autorenew</mat-icon>\n          </button>\n          <span class=\"fill-remaining\"></span>\n          <div *ngIf=\"hasTitle()\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n            <span>{{ oTitle | oTranslate }}</span>\n          </div>\n          <span *ngIf=\"hasTitle()\" class=\"fill-remaining\"></span>\n          <!-- <button *ngIf=\"insertButton\" md-icon-button aria-label=\"Add\" md-tooltip=\"{{'ADDNEWNODE' | oTranslate}}\" (click)=\"add()\">\n              <md-icon>add</md-icon>\n          </button> -->\n          <!-- <button *ngIf=\"editButton\" md-icon-button aria-label=\"Edit\" md-tooltip=\"{{'EDITTREE' | oTranslate}}\" (click)=\"edit()\">\n                  <md-icon>wrap_text</md-icon>\n              </button> -->\n          <!-- <button md-icon-button aria-label=\"ExpandAll/CollapseAll\" (click)=\"expandCollapseTree()\">\n              <md-icon>expand_{{isExpanded ? 'less' : 'more'}}</md-icon>\n          </button> -->\n          <o-search-input #searchInput *ngIf=\"useQuickFilter()\" placeholder=\"\" (onSearch)=\"onSearch($event)\"></o-search-input>\n        </div>\n      </mat-toolbar>\n      <div class=\"tree-content o-scroll\" [class.recursive-tree]=\"recursive\" [class.filtering-tree]=\"resetingTree\">\n        <tree #treeComponent *ngIf=\"!loading\" [tree]=\"rootTreeModel\" [settings]=\"settings\"\n          (nodeSelected)=\"nodeSelected($event)\" (nodeMoved)=\"nodeMoved($event)\"\n          (nodeCreated)=\"nodeCreated($event)\" (nodeRemoved)=\"nodeRemoved($event)\"\n          (nodeRenamed)=\"nodeRenamed($event)\" (nodeExpanded)=\"nodeExpanded($event)\"\n          (nodeCollapsed)=\"nodeCollapsed($event)\">\n        </tree>\n        <div class=\"spinner-container\" fxFlex=\"100\" *ngIf=\"loading\" fxLayoutAlign=\"center center\">\n          <mat-progress-spinner mode=\"indeterminate\" strokeWidth=\"3\">\n          </mat-progress-spinner>\n        </div>\n      </div>\n    </div>\n  ",
                    styles: ["\n    .o-tree .tree-container.has-controls .tree-content{height:calc(100% - 64px)}.o-tree .tree-container .tree-content{overflow:auto}.o-tree .tree-container .folding:not(.node-leaf)+.node-value,.o-tree .tree-container .recursive-tree .node-value{cursor:pointer}.o-tree .tree-container .filtering-tree{visibility:hidden}.o-tree .tree-container tree-internal ul{padding:0 0 4px 12px}.o-tree .tree-container tree-internal li{padding:0;margin:0;list-style:none;cursor:default}.o-tree .tree-container tree-internal li div{display:inline-block;box-sizing:border-box}.o-tree .tree-container tree-internal ul.rootless{padding:0}.o-tree .tree-container tree-internal div.rootless{display:none !important}.o-tree .tree-container tree-internal .tree{box-sizing:border-box}.o-tree .tree-container tree-internal .tree .node-value{display:inline-block}.o-tree .tree-container tree-internal .tree .node-value:after{display:none;height:0}.o-tree .tree-container tree-internal .tree .node-name{vertical-align:middle}.o-tree .tree-container tree-internal .tree .value-container+tree-internal>.tree{padding-top:6px}.o-tree .tree-container tree-internal .tree .folding{width:20px;display:inline-block;line-height:1px;padding:0 5px;font-weight:bold}.o-tree .tree-container tree-internal .tree .folding.node-leaf{width:0;padding:0 8px}.o-tree .tree-container .material-icons.collapsed-node:before,.o-tree .tree-container .material-icons.expanded-node:before{vertical-align:sub;font-size:18px;cursor:pointer}.o-tree .tree-container .material-icons.expanded-node:before{content:'\\E313'}.o-tree .tree-container .material-icons.collapsed-node:before{content:'\\E315'}\n  "],
                    inputs: DEFAULT_INPUTS_O_TREE,
                    outputs: DEFAULT_OUTPUTS_O_TREE,
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        { provide: OntimizeService, useFactory: ɵ0, deps: [Injector] }
                    ],
                    host: {
                        '[class.o-tree]': 'true'
                    }
                },] },
    ];
    OTreeComponent.ctorParameters = function () { return [
        { type: Injector, },
        { type: ElementRef, },
        { type: OFormComponent, decorators: [{ type: Optional }, { type: Inject, args: [forwardRef(function () { return OFormComponent; }),] },] },
    ]; };
    OTreeComponent.propDecorators = {
        "treeComponent": [{ type: ViewChild, args: ['treeComponent',] },],
        "searchInput": [{ type: ViewChildren, args: [OSearchInputComponent,] },],
    };
    __decorate([
        InputConverter(),
        __metadata("design:type", Boolean)
    ], OTreeComponent.prototype, "showRoot", void 0);
    __decorate([
        InputConverter(),
        __metadata("design:type", Boolean)
    ], OTreeComponent.prototype, "recursive", void 0);
    __decorate([
        InputConverter(),
        __metadata("design:type", Number)
    ], OTreeComponent.prototype, "recursiveLevels", void 0);
    __decorate([
        InputConverter(),
        __metadata("design:type", Boolean)
    ], OTreeComponent.prototype, "translate", void 0);
    __decorate([
        InputConverter(),
        __metadata("design:type", Boolean)
    ], OTreeComponent.prototype, "controls", void 0);
    __decorate([
        InputConverter(),
        __metadata("design:type", Boolean)
    ], OTreeComponent.prototype, "refreshButton", void 0);
    __decorate([
        InputConverter(),
        __metadata("design:type", Boolean)
    ], OTreeComponent.prototype, "quickFilter", void 0);
    __decorate([
        InputConverter(),
        __metadata("design:type", Boolean)
    ], OTreeComponent.prototype, "filterCaseSensitive", void 0);
    return OTreeComponent;
}(OServiceBaseComponent));
export { OTreeComponent };
var OTreeComponentModule = (function () {
    function OTreeComponentModule() {
    }
    OTreeComponentModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [OTreeComponent],
                    imports: [
                        OntimizeWebModule,
                        OSharedModule,
                        OSearchInputModule,
                        CommonModule,
                        TreeModule,
                        RouterModule
                    ],
                    exports: [OTreeComponent]
                },] },
    ];
    return OTreeComponentModule;
}());
export { OTreeComponentModule };
export { ɵ0 };
//# sourceMappingURL=o-tree.component.js.map