import { Component, EventEmitter, Inject, Input, Optional, Output } from '@angular/core';
import { TREEVIEW_CONFIG } from './config/tree-view-config.contants';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "./tree-view-item/tree-view-item.component";
export class TreeViewComponent {
    constructor(defaultOptions) {
        this.emptyResultsMessage = 'No results found at this moment.';
        this.showIcons = true;
        this.enableLabelLinkStyle = false;
        this.normalItemIconClass = 'fa fa-file';
        this.collapsableClosedItemIconClass = 'fa fa-folder';
        this.collapsableOpennedItemIconClass = 'fa fa-folder-open';
        this.expandAllOnInit = true;
        this.OnItemExpanded = new EventEmitter();
        this.OnItemClicked = new EventEmitter();
        Object.assign(this, defaultOptions);
        if (defaultOptions.styles) {
            Object.assign(this, defaultOptions.styles);
        }
    }
    ngOnInit() {
    }
}
TreeViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewComponent, deps: [{ token: TREEVIEW_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TreeViewComponent, selector: "ui-tree-view", inputs: { columns: "columns", data: "data", idProperty: "idProperty", labelProperty: "labelProperty", collectionProperty: "collectionProperty", emptyResultsMessage: "emptyResultsMessage", showIcons: "showIcons", enableLabelLinkStyle: "enableLabelLinkStyle", normalItemIconClass: "normalItemIconClass", collapsableClosedItemIconClass: "collapsableClosedItemIconClass", collapsableOpennedItemIconClass: "collapsableOpennedItemIconClass", expandAllOnInit: "expandAllOnInit" }, outputs: { OnItemExpanded: "OnItemExpanded", OnItemClicked: "OnItemClicked" }, ngImport: i0, template: "<div class=\"treeview-container\">\n  <div class=\"treeview-header d-flex align-items-center justify-content-end\" *ngIf=\"columns?.length > 0\">\n    <div class=\"column-header {{column.captionClasses}}\" *ngFor=\"let column of columns\" \n      [ngStyle]=\"{'width': column.width}\"\n      [ngClass]=\"{'text-center': column.captionAlignment == 1, 'text-right': column.captionAlignment == 2}\">\n      \n      {{column.caption}}\n    </div>\n  </div>\n  \n  <div class=\"treeview-content\" *ngIf=\"data?.length > 0\">\n    <ul>\n      <li *ngFor=\"let row of data; let first = first; let last = last;\" \n        ui-tree-view-item\n        [row]=\"row\"\n        [columns]=\"columns\"\n        [idProperty]=\"idProperty\"\n        [labelProperty]=\"labelProperty\"\n        [collectionProperty]=\"collectionProperty\"\n        [showIcons]=\"showIcons\"\n        [enableLabelLinkStyle]=\"enableLabelLinkStyle\"\n        [normalItemIconClass]=\"normalItemIconClass\"\n        [collapsableClosedItemIconClass]=\"collapsableClosedItemIconClass\"\n        [collapsableOpennedItemIconClass]=\"collapsableOpennedItemIconClass\"\n        [first]=\"first\"\n        [last]=\"last\"\n        [expandedOnInit]=\"expandAllOnInit\"\n        [rootItem]=\"true\"\n        (OnItemExpanded)=\"OnItemExpanded.emit($event)\"\n        (OnItemClicked)=\"OnItemClicked.emit($event)\"\n        >\n      </li>\n    </ul>\n  </div>\n\n  <p *ngIf=\"!data || data.length == 0\">{{emptyResultsMessage}}</p>\n</div>\n", styles: [".treeview-container .treeview-header{border-bottom:3px solid #CCC}.treeview-container .treeview-header .column-header{border:1px solid #CCC;border-bottom:0;padding:10px;margin-left:5px}.treeview-container .treeview-content ul{position:relative;padding:0;margin:0}.treeview-container .treeview-content ul li{list-style:none!important}@media (max-width: 860px){.treeview-header{display:none!important}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.TreeViewItemComponent, selector: "[ui-tree-view-item]", inputs: ["row", "idProperty", "labelProperty", "collectionProperty", "columns", "showIcons", "enableLabelLinkStyle", "normalItemIconClass", "collapsableClosedItemIconClass", "collapsableOpennedItemIconClass", "first", "last", "openned", "expandedOnInit", "rootItem"], outputs: ["OnItemExpanded", "OnItemClicked"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ui-tree-view', template: "<div class=\"treeview-container\">\n  <div class=\"treeview-header d-flex align-items-center justify-content-end\" *ngIf=\"columns?.length > 0\">\n    <div class=\"column-header {{column.captionClasses}}\" *ngFor=\"let column of columns\" \n      [ngStyle]=\"{'width': column.width}\"\n      [ngClass]=\"{'text-center': column.captionAlignment == 1, 'text-right': column.captionAlignment == 2}\">\n      \n      {{column.caption}}\n    </div>\n  </div>\n  \n  <div class=\"treeview-content\" *ngIf=\"data?.length > 0\">\n    <ul>\n      <li *ngFor=\"let row of data; let first = first; let last = last;\" \n        ui-tree-view-item\n        [row]=\"row\"\n        [columns]=\"columns\"\n        [idProperty]=\"idProperty\"\n        [labelProperty]=\"labelProperty\"\n        [collectionProperty]=\"collectionProperty\"\n        [showIcons]=\"showIcons\"\n        [enableLabelLinkStyle]=\"enableLabelLinkStyle\"\n        [normalItemIconClass]=\"normalItemIconClass\"\n        [collapsableClosedItemIconClass]=\"collapsableClosedItemIconClass\"\n        [collapsableOpennedItemIconClass]=\"collapsableOpennedItemIconClass\"\n        [first]=\"first\"\n        [last]=\"last\"\n        [expandedOnInit]=\"expandAllOnInit\"\n        [rootItem]=\"true\"\n        (OnItemExpanded)=\"OnItemExpanded.emit($event)\"\n        (OnItemClicked)=\"OnItemClicked.emit($event)\"\n        >\n      </li>\n    </ul>\n  </div>\n\n  <p *ngIf=\"!data || data.length == 0\">{{emptyResultsMessage}}</p>\n</div>\n", styles: [".treeview-container .treeview-header{border-bottom:3px solid #CCC}.treeview-container .treeview-header .column-header{border:1px solid #CCC;border-bottom:0;padding:10px;margin-left:5px}.treeview-container .treeview-content ul{position:relative;padding:0;margin:0}.treeview-container .treeview-content ul li{list-style:none!important}@media (max-width: 860px){.treeview-header{display:none!important}}\n"] }]
        }], ctorParameters: function () { return [{ type: undefined, decorators: [{
                    type: Inject,
                    args: [TREEVIEW_CONFIG]
                }, {
                    type: Optional
                }] }]; }, propDecorators: { columns: [{
                type: Input
            }], data: [{
                type: Input
            }], idProperty: [{
                type: Input
            }], labelProperty: [{
                type: Input
            }], collectionProperty: [{
                type: Input
            }], emptyResultsMessage: [{
                type: Input
            }], showIcons: [{
                type: Input
            }], enableLabelLinkStyle: [{
                type: Input
            }], normalItemIconClass: [{
                type: Input
            }], collapsableClosedItemIconClass: [{
                type: Input
            }], collapsableOpennedItemIconClass: [{
                type: Input
            }], expandAllOnInit: [{
                type: Input
            }], OnItemExpanded: [{
                type: Output
            }], OnItemClicked: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 