/**
 * 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 { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../../../close-button/close-button.component";
import * as i3 from "../../../label/label.component";
function ModalComponent_scrm_label_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "scrm-label", 3);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("labelKey", ctx_r0.titleKey);
} }
function ModalComponent_scrm_close_button_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "scrm-close-button", 4);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("config", ctx_r1.close);
} }
const _c0 = [[["", "modal-body", ""]], [["", "modal-footer", ""]]];
const _c1 = ["[modal-body]", "[modal-footer]"];
class ModalComponent {
    constructor() {
        this.klass = '';
        this.headerKlass = '';
        this.bodyKlass = '';
        this.footerKlass = '';
        this.titleKey = '';
        this.closable = false;
        this.close = {
            klass: ['btn', 'btn-outline-light', 'btn-sm']
        };
    }
    static { this.ɵfac = function ModalComponent_Factory(t) { return new (t || ModalComponent)(); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ModalComponent, selectors: [["scrm-modal"]], inputs: { klass: "klass", headerKlass: "headerKlass", bodyKlass: "bodyKlass", footerKlass: "footerKlass", titleKey: "titleKey", closable: "closable", close: "close" }, ngContentSelectors: _c1, decls: 9, vars: 13, consts: [[1, "modal-title"], [3, "labelKey", 4, "ngIf"], [3, "config", 4, "ngIf"], [3, "labelKey"], [3, "config"]], template: function ModalComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵprojectionDef(_c0);
            i0.ɵɵelementStart(0, "div")(1, "div")(2, "div", 0);
            i0.ɵɵtemplate(3, ModalComponent_scrm_label_3_Template, 1, 1, "scrm-label", 1);
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(4, ModalComponent_scrm_close_button_4_Template, 1, 1, "scrm-close-button", 2);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(5, "div");
            i0.ɵɵprojection(6);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(7, "div");
            i0.ɵɵprojection(8, 1);
            i0.ɵɵelementEnd()();
        } if (rf & 2) {
            i0.ɵɵclassMap(ctx.klass);
            i0.ɵɵadvance(1);
            i0.ɵɵclassMapInterpolate1("modal-header ", ctx.headerKlass, " d-flex align-items-center");
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ngIf", ctx.titleKey);
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.closable);
            i0.ɵɵadvance(1);
            i0.ɵɵclassMapInterpolate1("modal-body ", ctx.bodyKlass, "");
            i0.ɵɵadvance(2);
            i0.ɵɵclassMapInterpolate1("modal-footer ", ctx.footerKlass, "");
        } }, dependencies: [i1.NgIf, i2.CloseButtonComponent, i3.LabelComponent], encapsulation: 2 }); }
}
export { ModalComponent };
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalComponent, [{
        type: Component,
        args: [{ selector: 'scrm-modal', 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 [class]=\"klass\">\n    <div class=\"modal-header {{headerKlass}} d-flex align-items-center\">\n        <div class=\"modal-title\">\n            <scrm-label *ngIf=\"titleKey\" [labelKey]=\"titleKey\"></scrm-label>\n        </div>\n        <scrm-close-button *ngIf=\"closable\" [config]=\"close\"></scrm-close-button>\n    </div>\n\n    <div class=\"modal-body {{bodyKlass}}\">\n        <ng-content select=\"[modal-body]\"></ng-content>\n    </div>\n\n    <div class=\"modal-footer {{footerKlass}}\">\n        <ng-content select=\"[modal-footer]\"></ng-content>\n    </div>\n</div>\n" }]
    }], null, { klass: [{
            type: Input
        }], headerKlass: [{
            type: Input
        }], bodyKlass: [{
            type: Input
        }], footerKlass: [{
            type: Input
        }], titleKey: [{
            type: Input
        }], closable: [{
            type: Input
        }], close: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 