/**
 * SuiteCRM is a customer relationship management program developed by SalesAgility Ltd.
 * Copyright (C) 2023 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 { Component, Input } from '@angular/core';
import { LanguageStore } from '../../../../store/language/language.store';
import * as i0 from "@angular/core";
import * as i1 from "../../../../store/language/language.store";
import * as i2 from "@angular/common";
import * as i3 from "@angular/router";
import * as i4 from "../../../../components/label/label.component";
import * as i5 from "../../../../components/image/image.component";
function AdminCardComponent_div_1_ng_container_5_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 9)(1, "a", 10)(2, "div", 11);
    i0.ɵɵelement(3, "scrm-image", 12)(4, "scrm-label", 13);
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const item_r3 = ctx.$implicit;
    const isFirst_r4 = ctx.first;
    const ctx_r2 = i0.ɵɵnextContext(3);
    i0.ɵɵclassProp("border-top", isFirst_r4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("queryParams", item_r3 == null ? null : item_r3.params)("routerLink", item_r3.link)("title", ctx_r2.language.getFieldLabel(item_r3.descriptionKey, "administration"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("image", item_r3.icon);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("labelKey", item_r3.titleKey);
} }
function AdminCardComponent_div_1_ng_container_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, AdminCardComponent_div_1_ng_container_5_div_1_Template, 5, 7, "div", 8);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", ctx_r1.content.linkGroup);
} }
function AdminCardComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 2)(1, "div", 3)(2, "h5", 4);
    i0.ɵɵelement(3, "scrm-label", 5);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(4, "div", 6);
    i0.ɵɵtemplate(5, AdminCardComponent_div_1_ng_container_5_Template, 2, 1, "ng-container", 7);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", ctx_r0.language.getFieldLabel(ctx_r0.content.descriptionLabelKey, "administration"));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("labelKey", ctx_r0.content.titleLabelKey);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r0.content.linkGroup);
} }
class AdminCardComponent {
    constructor(language) {
        this.language = language;
    }
    static { this.ɵfac = function AdminCardComponent_Factory(t) { return new (t || AdminCardComponent)(i0.ɵɵdirectiveInject(i1.LanguageStore)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AdminCardComponent, selectors: [["scrm-admin-card"]], inputs: { content: "content" }, decls: 2, vars: 1, consts: [[1, "widget-panel", "h-100", "shadow-sm"], ["class", "card h-100 panel-card border-0", 4, "ngIf"], [1, "card", "h-100", "panel-card", "border-0"], [1, "card-header"], [1, "card-title", "admin-card-title", "m-0", 3, "title"], ["module", "administration", 3, "labelKey"], [1, "card-body", "d-flex", "flex-column", "align-items-start"], [4, "ngIf"], ["class", "admin-card-link-box border-bottom w-100", 3, "border-top", 4, "ngFor", "ngForOf"], [1, "admin-card-link-box", "border-bottom", "w-100"], ["queryParamsHandling", "merge", 1, "card-link", "admin-card-link", 3, "queryParams", "routerLink", "title"], [1, "d-flex", "admin-card-link-wrapper", "align-items-center", "w-100", "p-1"], [1, "admin-card-icon", "sicon-2x", 3, "image"], ["module", "administration", 1, "admin-card-label", "pl-1", "flex-grow-1", 3, "labelKey"]], template: function AdminCardComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵtemplate(1, AdminCardComponent_div_1_Template, 6, 3, "div", 1);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.content);
        } }, dependencies: [i2.NgForOf, i2.NgIf, i3.RouterLink, i4.LabelComponent, i5.ImageComponent], encapsulation: 2 }); }
}
export { AdminCardComponent };
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AdminCardComponent, [{
        type: Component,
        args: [{ selector: 'scrm-admin-card', template: "<! --\n/**\n* SuiteCRM is a customer relationship management program developed by SalesAgility Ltd.\n* Copyright (C) 2023 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\n<div class=\"widget-panel h-100 shadow-sm\">\n    <div *ngIf=\"content\" class=\"card h-100 panel-card border-0\">\n        <div class=\"card-header\">\n            <h5 [title]=\"language.getFieldLabel(content.descriptionLabelKey, 'administration')\"\n                class=\"card-title admin-card-title m-0\">\n                <scrm-label [labelKey]=\"content.titleLabelKey\" module=\"administration\"></scrm-label>\n            </h5>\n        </div>\n        <div class=\"card-body d-flex flex-column align-items-start\">\n            <ng-container *ngIf=\"content.linkGroup\">\n                <div *ngFor=\"let item of content.linkGroup; let isFirst = first\" [class.border-top]=\"isFirst\"\n                     class=\"admin-card-link-box border-bottom w-100\">\n                    <a [queryParams]=\"item?.params\"\n                       [routerLink]=\"item.link\"\n                       [title]=\"language.getFieldLabel(item.descriptionKey, 'administration')\"\n                       class=\"card-link admin-card-link\"\n                       queryParamsHandling=\"merge\">\n                        <div class=\"d-flex admin-card-link-wrapper align-items-center w-100 p-1 \">\n                            <scrm-image [image]=\"item.icon\" class=\"admin-card-icon sicon-2x\"></scrm-image>\n                            <scrm-label [labelKey]=\"item.titleKey\"\n                                        class=\"admin-card-label pl-1 flex-grow-1\"\n                                        module=\"administration\">\n                            </scrm-label>\n                        </div>\n\n                    </a>\n                </div>\n            </ng-container>\n        </div>\n    </div>\n</div>\n\n" }]
    }], function () { return [{ type: i1.LanguageStore }]; }, { content: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 