/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
 */
import { Component, Input, EventEmitter, Output } from '@angular/core';
import { ProcessService } from '../../../../services/process.service';
var FVMenuFolderComponent = /** @class */ (function () {
    function FVMenuFolderComponent(process) {
        this.process = process;
        this.onFolderClick = new EventEmitter();
        /** @type {?} */
        var debug = this.process.get('environment').debug || window['debug'];
        if (!debug) {
            return;
        }
        this.debug = debug === true || debug.tooltips === true;
    }
    Object.defineProperty(FVMenuFolderComponent.prototype, "activeNode", {
        get: /**
         * @return {?}
         */
        function () {
            return this._activeNode;
        },
        set: /**
         * @param {?} activeNode
         * @return {?}
         */
        function (activeNode) {
            this._activeNode = activeNode;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FVMenuFolderComponent.prototype, "designer", {
        get: /**
         * @return {?}
         */
        function () {
            return this._designer;
        },
        set: /**
         * @param {?} designer
         * @return {?}
         */
        function (designer) {
            this._designer = designer;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FVMenuFolderComponent.prototype, "level", {
        get: /**
         * @return {?}
         */
        function () {
            return this._level || 0;
        },
        set: /**
         * @param {?} level
         * @return {?}
         */
        function (level) {
            this._level = level;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FVMenuFolderComponent.prototype, "folder", {
        get: /**
         * @return {?}
         */
        function () {
            return this._folder;
        },
        set: /**
         * @param {?} folder
         * @return {?}
         */
        function (folder) {
            this._folder = folder;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FVMenuFolderComponent.prototype, "debugHtml", {
        get: /**
         * @return {?}
         */
        function () {
            if (!this.designer) {
                return;
            }
            return "<span>folder: " + this.designer.name + ".</span><br>\n    <span>table: " + this.designer.model.table + ".</span><br>\n    <span>table-view: " + this.designer.model.view + ".</span>";
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} folder
     * @return {?}
     */
    FVMenuFolderComponent.prototype.folderClicked = /**
     * @param {?} folder
     * @return {?}
     */
    function (folder) {
        this.onFolderClick.emit(folder);
    };
    FVMenuFolderComponent.decorators = [
        { type: Component, args: [{
                    selector: 'fv-menu-folder',
                    template: "<ng-container *ngIf=\"folder\">\n  <div *ngIf=\"!folder.folders\" class=\"treeItem\" (click)=\"folderClicked(folder)\" [ngClass]=\"{active: folder.name === activeNode }\"\n    [tooltip]=\"debug && debugTemplate\">\n    <i [class]=\"folder.icon\"></i>\n    {{ folder.title | ltranslate }}\n  </div>\n  <ng-container *ngIf=\"folder.folders && folder.folders.length\">\n    <accordion class=\"treeList\">\n      <accordion-group #gr [isOpen]=\"true\">\n        <div accordion-heading>\n          <span [innerText]=\"folder.title | ltranslate\"></span>\n          <i [ngClass]=\"{'float-right pull-right fa': true, 'fa-angle-down': !gr.isOpen, 'fa-angle-left': gr.isOpen}\"></i>\n        </div>\n        <fv-menu-folder *ngFor=\"let f of folder.folders; let i = index\" [designer]=\"designer?.folders[i]\" [folder]=\"f\" [level]=\"level + 1\"\n          (onFolderClick)=\"folderClicked($event)\" [activeNode]=\"activeNode\"></fv-menu-folder>\n      </accordion-group>\n    </accordion>\n  </ng-container>\n</ng-container>\n<ng-template #debugTemplate>\n  <div [innerHtml]=\"debugHtml\"></div>\n</ng-template>",
                    styles: [".treeList{list-style:none}.treeItem{border-bottom:1px solid #eee;padding:18px 10px;margin:1%;color:#00f}.treeItem.active{background:#eee;color:#000}.treeItem:hover{color:#000;cursor:pointer}.panel-group{margin-bottom:10px;margin-top:10px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel{box-shadow:initial}"]
                }] }
    ];
    /** @nocollapse */
    FVMenuFolderComponent.ctorParameters = function () { return [
        { type: ProcessService }
    ]; };
    FVMenuFolderComponent.propDecorators = {
        onFolderClick: [{ type: Output }],
        activeNode: [{ type: Input }],
        designer: [{ type: Input }],
        level: [{ type: Input }],
        folder: [{ type: Input }]
    };
    return FVMenuFolderComponent;
}());
export { FVMenuFolderComponent };
if (false) {
    /** @type {?} */
    FVMenuFolderComponent.prototype.debug;
    /** @type {?} */
    FVMenuFolderComponent.prototype.onFolderClick;
    /** @type {?} */
    FVMenuFolderComponent.prototype._activeNode;
    /** @type {?} */
    FVMenuFolderComponent.prototype._designer;
    /** @type {?} */
    FVMenuFolderComponent.prototype._level;
    /** @type {?} */
    FVMenuFolderComponent.prototype._folder;
    /** @type {?} */
    FVMenuFolderComponent.prototype.process;
}

//# sourceMappingURL=data:application/json;base64, 