/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
 */
import { Component, Input, ElementRef } from '@angular/core';
import { DisplayStateService } from '../../../services/DisplayStateService';
var RecursivePanelComponent = /** @class */ (function () {
    function RecursivePanelComponent(displayStateService, myElement) {
        this.displayStateService = displayStateService;
        this.myElement = myElement;
        this.additionalContext = undefined;
    }
    /**
     * @param {?} ctxt
     * @return {?}
     */
    RecursivePanelComponent.prototype.getContext = /**
     * @param {?} ctxt
     * @return {?}
     */
    function (ctxt) {
        if (this.additionalContext !== null && this.additionalContext !== undefined) {
            ctxt[this.additionalContext.name] = this.additionalContext.value;
        }
        return ctxt;
    };
    /**
     * @return {?}
     */
    RecursivePanelComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
    };
    RecursivePanelComponent.decorators = [
        { type: Component, args: [{
                    selector: 'app-recursive-panel',
                    template: "<div class=\"leaf\" *ngIf=\"levelsBelow > 0; else lastLevel\">\r\n    <div class=\"leaf\" *ngFor=\"let gc of GroupedKeyList | groupKeyFilter; let i = index\">\r\n        <a href=\"javascript:void(0)\" (click)=\"gc.collapsed = !gc.collapsed\">\r\n            <i class='fa fa-chevron-right' [ngClass]=\"(gc.collapsed)?'fa-chevron-right':'fa-chevron-down'\"></i>\r\n        </a>\r\n        <a [platformRouterLink]=\"getContext(gc.context)\">{{gc.name}}</a>\r\n        <div *ngIf=\"!gc.collapsed\" class=\"collapse show\" id=\"{{gc.key}}\">\r\n            <div class=\"leaf\">\r\n                <app-recursive-panel *ngIf=\"levelsBelow > 0\" [additionalContext]=\"additionalContext\" [GroupedKeyList]=\"gc.children\" [levelsBelow]=\"levelsBelow-1\" [toggleState]=\"toggleState\" [topLevel]=\"false\"></app-recursive-panel>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>\r\n<ng-template #lastLevel>\r\n    <div class=\"leaf\" *ngFor=\"let gc of GroupedKeyList | groupKeyFilter\">\r\n        <a [platformRouterLink]=\"getContext(gc.context)\">{{gc.name}}</a>\r\n        <span class=\"badge\">{{gc.badge}}</span>\r\n    </div>\r\n</ng-template>",
                    styles: [".leaf{padding:.25em 0 .25em .25em;width:100%}"]
                }] }
    ];
    /** @nocollapse */
    RecursivePanelComponent.ctorParameters = function () { return [
        { type: DisplayStateService },
        { type: ElementRef }
    ]; };
    RecursivePanelComponent.propDecorators = {
        GroupedKeyList: [{ type: Input }],
        levelsBelow: [{ type: Input }],
        toggleState: [{ type: Input }],
        additionalContext: [{ type: Input }],
        topLevel: [{ type: Input }]
    };
    return RecursivePanelComponent;
}());
export { RecursivePanelComponent };
if (false) {
    /** @type {?} */
    RecursivePanelComponent.prototype.GroupedKeyList;
    /** @type {?} */
    RecursivePanelComponent.prototype.levelsBelow;
    /** @type {?} */
    RecursivePanelComponent.prototype.toggleState;
    /** @type {?} */
    RecursivePanelComponent.prototype.additionalContext;
    /** @type {?} */
    RecursivePanelComponent.prototype.topLevel;
    /** @type {?} */
    RecursivePanelComponent.prototype.displayStateService;
    /** @type {?} */
    RecursivePanelComponent.prototype.myElement;
}

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjdXJzaXZlLXBhbmVsLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL3dlYi1wbGF0Zm9ybS1saWJyYXJ5LyIsInNvdXJjZXMiOlsiY29tcG9uZW50cy93aWRnZXRzL3JlY3Vyc2l2ZS1wYW5lbC9yZWN1cnNpdmUtcGFuZWwuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFJckUsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sdUNBQXVDLENBQUM7O0lBa0IxRSxpQ0FBbUIsbUJBQXdDLEVBQVUsU0FBcUI7UUFBdkUsd0JBQW1CLE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