/**
 * SuiteCRM is a customer relationship management program developed by SalesAgility Ltd.
 * Copyright (C) 2021 SalesAgility Ltd.
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY SALESAGILITY, SALESAGILITY DISCLAIMS THE
 * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * In accordance with Section 7(b) of the GNU Affero General Public License
 * version 3, these Appropriate Legal Notices must retain the display of the
 * "Supercharged by SuiteCRM" logo. If the display of the logos is not reasonably
 * feasible for technical reasons, the Appropriate Legal Notices must display
 * the words "Supercharged by SuiteCRM".
 */
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { deepClone, emptyObject } from 'common';
import { LanguageStore } from '../../store/language/language.store';
import { SystemConfigStore } from "../../store/system-config/system-config.store";
import * as i0 from "@angular/core";
import * as i1 from "../../store/language/language.store";
import * as i2 from "../../store/system-config/system-config.store";
import * as i3 from "@angular/common";
import * as i4 from "@ng-bootstrap/ng-bootstrap";
import * as i5 from "../image/image.component";
import * as i6 from "../dropdown-submenu/dropdown-submenu.component";
import * as i7 from "../label/label.component";
import * as i8 from "../../pipes/truncate/truncate.pipe";
function DropdownButtonComponent_scrm_image_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "scrm-image", 7);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("image", ctx_r1.config.icon)("klass", ctx_r1.config.iconKlass || "");
} }
function DropdownButtonComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "truncate");
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.config.label, ctx_r2.charSize.maxLength), " ");
} }
function DropdownButtonComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelement(1, "scrm-label", 8);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("labelKey", ctx_r3.config.labelKey);
} }
function DropdownButtonComponent_ng_container_7_div_1_ng_container_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
const _c0 = function (a0) { return { item: a0 }; };
function DropdownButtonComponent_ng_container_7_div_1_ng_container_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, DropdownButtonComponent_ng_container_7_div_1_ng_container_3_ng_container_1_Template, 1, 0, "ng-container", 13);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const item_r13 = ctx.$implicit;
    i0.ɵɵnextContext(3);
    const _r6 = i0.ɵɵreference(10);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngTemplateOutlet", _r6)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, item_r13));
} }
function DropdownButtonComponent_ng_container_7_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 10)(1, "div", 11);
    i0.ɵɵelement(2, "scrm-label", 8);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(3, DropdownButtonComponent_ng_container_7_div_1_ng_container_3_Template, 2, 4, "ng-container", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const section_r9 = ctx.$implicit;
    const isLast_r10 = ctx.last;
    const isFirst_r11 = ctx.first;
    let tmp_3_0;
    let tmp_4_0;
    i0.ɵɵclassProp("section-split", !isFirst_r11)("last-section", isLast_r10)("first-section", isFirst_r11);
    i0.ɵɵproperty("ngClass", (tmp_3_0 = section_r9.klass) !== null && tmp_3_0 !== undefined ? tmp_3_0 : "");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("labelKey", (tmp_4_0 = (tmp_4_0 = section_r9.labelKey) !== null && tmp_4_0 !== undefined ? tmp_4_0 : section_r9.label) !== null && tmp_4_0 !== undefined ? tmp_4_0 : "");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", section_r9.items);
} }
function DropdownButtonComponent_ng_container_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, DropdownButtonComponent_ng_container_7_div_1_Template, 4, 9, "div", 9);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", ctx_r4.sections);
} }
function DropdownButtonComponent_ng_container_8_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function DropdownButtonComponent_ng_container_8_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, DropdownButtonComponent_ng_container_8_ng_container_1_ng_container_1_Template, 1, 0, "ng-container", 13);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const item_r17 = ctx.$implicit;
    i0.ɵɵnextContext(2);
    const _r6 = i0.ɵɵreference(10);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngTemplateOutlet", _r6)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, item_r17));
} }
function DropdownButtonComponent_ng_container_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, DropdownButtonComponent_ng_container_8_ng_container_1_Template, 2, 4, "ng-container", 12);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", ctx_r5.config.items);
} }
function DropdownButtonComponent_ng_template_9_ng_container_0_div_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "scrm-image", 7);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r19 = i0.ɵɵnextContext(2).item;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("image", item_r19.icon)("klass", item_r19.iconKlass || "");
} }
function DropdownButtonComponent_ng_template_9_ng_container_0_ng_container_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtext(1);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const item_r19 = i0.ɵɵnextContext(2).item;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", item_r19.label, " ");
} }
function DropdownButtonComponent_ng_template_9_ng_container_0_ng_container_6_scrm_label_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "scrm-label", 18);
} if (rf & 2) {
    const item_r19 = i0.ɵɵnextContext(3).item;
    let tmp_1_0;
    i0.ɵɵproperty("labelKey", item_r19.labelKey)("module", (tmp_1_0 = item_r19.labelModule) !== null && tmp_1_0 !== undefined ? tmp_1_0 : "");
} }
function DropdownButtonComponent_ng_template_9_ng_container_0_ng_container_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, DropdownButtonComponent_ng_template_9_ng_container_0_ng_container_6_scrm_label_1_Template, 1, 2, "scrm-label", 17);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const item_r19 = i0.ɵɵnextContext(2).item;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r19 && item_r19.labelKey);
} }
function DropdownButtonComponent_ng_template_9_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    const _r32 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "a", 14);
    i0.ɵɵlistener("click", function DropdownButtonComponent_ng_template_9_ng_container_0_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r32); const item_r19 = i0.ɵɵnextContext().item; const ctx_r30 = i0.ɵɵnextContext(); const _r0 = i0.ɵɵreference(1); return i0.ɵɵresetView(item_r19 && ctx_r30.click(item_r19.onClick, _r0)); });
    i0.ɵɵelementStart(2, "div", 15);
    i0.ɵɵtemplate(3, DropdownButtonComponent_ng_template_9_ng_container_0_div_3_Template, 2, 2, "div", 4);
    i0.ɵɵelementStart(4, "div", 16);
    i0.ɵɵtemplate(5, DropdownButtonComponent_ng_template_9_ng_container_0_ng_container_5_Template, 2, 1, "ng-container", 4);
    i0.ɵɵtemplate(6, DropdownButtonComponent_ng_template_9_ng_container_0_ng_container_6_Template, 2, 1, "ng-container", 4);
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const item_r19 = i0.ɵɵnextContext().item;
    const ctx_r20 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngClass", item_r19 && item_r19.klass)("title", ctx_r20.language.getFieldLabel(item_r19 == null ? null : item_r19.titleKey) || (item_r19 == null ? null : item_r19.title) || "");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", item_r19.icon);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", item_r19 && item_r19.label);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r19 && !item_r19.label && item_r19.labelKey);
} }
function DropdownButtonComponent_ng_template_9_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    const _r35 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "scrm-dropdown-submenu", 19);
    i0.ɵɵlistener("item-clicked", function DropdownButtonComponent_ng_template_9_ng_container_1_Template_scrm_dropdown_submenu_item_clicked_1_listener() { i0.ɵɵrestoreView(_r35); const ctx_r34 = i0.ɵɵnextContext(2); const _r0 = i0.ɵɵreference(1); return i0.ɵɵresetView(ctx_r34.close(_r0)); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const item_r19 = i0.ɵɵnextContext().item;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("item", item_r19);
} }
function DropdownButtonComponent_ng_template_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, DropdownButtonComponent_ng_template_9_ng_container_0_Template, 7, 5, "ng-container", 4);
    i0.ɵɵtemplate(1, DropdownButtonComponent_ng_template_9_ng_container_1_Template, 2, 1, "ng-container", 4);
} if (rf & 2) {
    const item_r19 = ctx.item;
    const ctx_r7 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngIf", item_r19 && !ctx_r7.isDropdown(item_r19));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r19 && ctx_r7.isDropdown(item_r19));
} }
class DropdownButtonComponent {
    constructor(language, systemConfigStore) {
        this.language = language;
        this.systemConfigStore = systemConfigStore;
        this.disabled = false;
        this.autoClose = true;
        this.sections = [];
        this.sectionsEnabled = false;
        this.charSize = {
            minLength: 20,
            mediumLength: 20,
            maxLength: 20
        };
    }
    isDropdown(item) {
        if (!item) {
            return false;
        }
        return 'items' in item;
    }
    click(onClick, dropdown) {
        onClick();
        dropdown.close();
    }
    close(dropdown) {
        dropdown.close();
    }
    ngOnInit() {
        if (this.config && !this.config.placement) {
            this.config.placement = ['bottom-left', 'bottom-right', 'top-left', 'top-right'];
        }
        this.sections = [];
        const sectionsConfig = this.config?.sections ?? {};
        if (emptyObject(sectionsConfig)) {
            this.sectionsEnabled = false;
            return;
        }
        this.sectionsEnabled = true;
        this.preprocessItems(this.config?.items ?? []);
        const characterSizes = this.systemConfigStore.getUi('navbar_truncate_character_sizes');
        this.charSize = { ...characterSizes };
    }
    preprocessItems(items) {
        const sectionsConfig = this.config?.sections ?? {};
        const sections = {};
        if (!items || !items.length) {
            return;
        }
        items.forEach(item => {
            const sectionKey = item?.section ?? 'default';
            let section = this.getSection(sectionsConfig, sectionKey, sections);
            section.items.push(item);
        });
        Object.keys(sectionsConfig).forEach(sectionKey => {
            const section = sections[sectionKey];
            if (section && section.items && section.items.length) {
                this.sections.push(section);
            }
        });
    }
    /**
     * Get section from map, initialize if not on map
     * @param sectionsConfig
     * @param sectionKey
     * @param sections
     * @protected
     */
    getSection(sectionsConfig, sectionKey, sections) {
        const sectionConfig = sectionsConfig[sectionKey] ?? {};
        let section = sections[sectionKey] ?? null;
        if (section === null) {
            section = deepClone(sectionConfig);
            section.items = [];
            sections[sectionKey] = section;
        }
        return section;
    }
    getPlacement() {
        if (this.config && !this.config.placement) {
            return ['bottom-left', 'bottom-right', 'top-left', 'top-right'];
        }
        return this.config.placement;
    }
    static { this.ɵfac = function DropdownButtonComponent_Factory(t) { return new (t || DropdownButtonComponent)(i0.ɵɵdirectiveInject(i1.LanguageStore), i0.ɵɵdirectiveInject(i2.SystemConfigStore)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DropdownButtonComponent, selectors: [["scrm-dropdown-button"]], inputs: { config: "config", disabled: "disabled", autoClose: "autoClose" }, decls: 11, vars: 13, consts: [["ngbDropdown", "", 1, "d-inline-block", "dropdown-button", 3, "autoClose", "placement", "ngClass"], ["dropDown", "ngbDropdown"], ["ngbDropdownToggle", "", 3, "disabled", "ngClass", "title"], [3, "image", "klass", 4, "ngIf"], [4, "ngIf"], ["ngbDropdownMenu", ""], ["buttonTemplate", ""], [3, "image", "klass"], [3, "labelKey"], [3, "ngClass", "section-split", "last-section", "first-section", 4, "ngFor", "ngForOf"], [3, "ngClass"], [1, "dropdown-menu-item-header"], [4, "ngFor", "ngForOf"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], ["ngbDropdownItem", "", 3, "ngClass", "title", "click"], [1, "d-flex", "align-items-center"], [1, "dropdown-item-label", "flex-grow-1"], [3, "labelKey", "module", 4, "ngIf"], [3, "labelKey", "module"], [3, "item", "item-clicked"]], template: function DropdownButtonComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0, 1)(2, "button", 2);
            i0.ɵɵtemplate(3, DropdownButtonComponent_scrm_image_3_Template, 1, 2, "scrm-image", 3);
            i0.ɵɵtemplate(4, DropdownButtonComponent_ng_container_4_Template, 3, 4, "ng-container", 4);
            i0.ɵɵtemplate(5, DropdownButtonComponent_ng_container_5_Template, 2, 1, "ng-container", 4);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(6, "div", 5);
            i0.ɵɵtemplate(7, DropdownButtonComponent_ng_container_7_Template, 2, 1, "ng-container", 4);
            i0.ɵɵtemplate(8, DropdownButtonComponent_ng_container_8_Template, 2, 1, "ng-container", 4);
            i0.ɵɵelementEnd()();
            i0.ɵɵtemplate(9, DropdownButtonComponent_ng_template_9_Template, 2, 2, "ng-template", null, 6, i0.ɵɵtemplateRefExtractor);
        } if (rf & 2) {
            i0.ɵɵclassProp("sectioned-dropdown-menu", ctx.sectionsEnabled);
            i0.ɵɵproperty("autoClose", ctx.autoClose)("placement", ctx.getPlacement())("ngClass", ctx.config.wrapperKlass);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("disabled", ctx.disabled)("ngClass", ctx.config.klass)("title", ctx.language.getFieldLabel(ctx.config.titleKey) || "");
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.config.icon);
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.config.label);
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", !ctx.config.label && ctx.config.labelKey);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ngIf", ctx.sectionsEnabled);
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", !ctx.sectionsEnabled);
        } }, dependencies: [i3.NgClass, i3.NgForOf, i3.NgIf, i3.NgTemplateOutlet, i4.NgbDropdown, i4.NgbDropdownToggle, i4.NgbDropdownMenu, i4.NgbDropdownItem, i5.ImageComponent, i6.DropdownSubmenuComponent, i7.LabelComponent, i8.TruncatePipe], encapsulation: 2, changeDetection: 0 }); }
}
export { DropdownButtonComponent };
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DropdownButtonComponent, [{
        type: Component,
        args: [{ selector: 'scrm-dropdown-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<! --\n/**\n* SuiteCRM is a customer relationship management program developed by SalesAgility Ltd.\n* Copyright (C) 2021 SalesAgility Ltd.\n*\n* This program is free software; you can redistribute it and/or modify it under\n* the terms of the GNU Affero General Public License version 3 as published by the\n* Free Software Foundation with the addition of the following permission added\n* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK\n* IN WHICH THE COPYRIGHT IS OWNED BY SALESAGILITY, SALESAGILITY DISCLAIMS THE\n* WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.\n*\n* This program is distributed in the hope that it will be useful, but WITHOUT\n* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more\n* details.\n*\n* You should have received a copy of the GNU Affero General Public License\n* along with this program.  If not, see http://www.gnu.org/licenses.\n*\n* In accordance with Section 7(b) of the GNU Affero General Public License\n* version 3, these Appropriate Legal Notices must retain the display of the\n* \"Supercharged by SuiteCRM\" logo. If the display of the logos is not reasonably\n* feasible for technical reasons, the Appropriate Legal Notices must display\n* the words \"Supercharged by SuiteCRM\".\n*/\n-->\n<div ngbDropdown\n     [autoClose]=\"autoClose\"\n     [placement]=\"getPlacement()\"\n     #dropDown=\"ngbDropdown\"\n     class=\"d-inline-block dropdown-button\"\n     [class.sectioned-dropdown-menu]=\"sectionsEnabled\"\n     [ngClass]=\"config.wrapperKlass\">\n    <button [disabled]=\"disabled\"\n            [ngClass]=\"config.klass\"\n            [title]=\"language.getFieldLabel(config.titleKey) || ''\"\n            ngbDropdownToggle>\n\n        <scrm-image *ngIf=\"config.icon\"\n                    [image]=\"config.icon\"\n                    [klass]=\"config.iconKlass || ''\"></scrm-image>\n\n        <ng-container *ngIf=\"config.label\">\n            {{ config.label | truncate: charSize.maxLength}}\n        </ng-container>\n\n        <ng-container *ngIf=\"!config.label && config.labelKey\">\n            <scrm-label [labelKey]=\"config.labelKey\"></scrm-label>\n        </ng-container>\n\n    </button>\n    <div ngbDropdownMenu>\n\n        <ng-container *ngIf=\"sectionsEnabled\">\n\n            <div *ngFor=\"let section of sections; last as isLast; first as isFirst\"\n                 [ngClass]=\"section.klass ?? ''\"\n                 [class.section-split]=\"!isFirst\"\n                 [class.last-section]=\"isLast\"\n                 [class.first-section]=\"isFirst\">\n                <div class=\"dropdown-menu-item-header\">\n                    <scrm-label [labelKey]=\"section.labelKey ?? section.label ?? ''\" ></scrm-label>\n                </div>\n\n                <ng-container *ngFor=\"let item of section.items; let last = last\">\n                    <ng-container *ngTemplateOutlet=\"buttonTemplate; context: { item: item }\"></ng-container>\n                </ng-container>\n\n            </div>\n\n        </ng-container>\n\n        <ng-container *ngIf=\"!sectionsEnabled\">\n            <ng-container *ngFor=\"let item of config.items\">\n                <ng-container *ngTemplateOutlet=\"buttonTemplate; context: { item: item }\"></ng-container>\n            </ng-container>\n        </ng-container>\n\n    </div>\n</div>\n\n\n<ng-template #buttonTemplate let-item=\"item\">\n\n    <ng-container *ngIf=\"item && !isDropdown(item)\">\n        <a ngbDropdownItem\n           [ngClass]=\"item && item.klass\"\n           [title]=\"(language.getFieldLabel(item?.titleKey) || item?.title) || ''\"\n           (click)=\"item && click(item.onClick, dropDown)\">\n            <div class=\"d-flex align-items-center\">\n                <div *ngIf=\"item.icon\">\n                    <scrm-image [image]=\"item.icon\" [klass]=\"item.iconKlass || ''\"></scrm-image>\n                </div>\n                <div class=\"dropdown-item-label flex-grow-1\">\n                    <ng-container *ngIf=\"item && item.label\">\n                        {{ item.label }}\n                    </ng-container>\n                    <ng-container *ngIf=\"item && !item.label && item.labelKey\">\n                        <scrm-label *ngIf=\"item && item.labelKey\" [labelKey]=\"item.labelKey\"\n                                    [module]=\"item.labelModule ?? ''\"></scrm-label>\n                    </ng-container>\n                </div>\n            </div>\n        </a>\n    </ng-container>\n\n    <ng-container *ngIf=\"item && isDropdown(item)\">\n        <scrm-dropdown-submenu (item-clicked)=\"close(dropDown)\" [item]=\"item\"></scrm-dropdown-submenu>\n    </ng-container>\n\n</ng-template>\n" }]
    }], function () { return [{ type: i1.LanguageStore }, { type: i2.SystemConfigStore }]; }, { config: [{
            type: Input
        }], disabled: [{
            type: Input
        }], autoClose: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 