import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ironsource/fusion-ui/components/button/v2";
const _c0 = a0 => ({ small: a0 });
function ModalFooterComponent_fusion_button_4_Template(rf, ctx) { if (rf & 1) {
    const _r2 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-button", 5);
    i0.ɵɵlistener("click", function ModalFooterComponent_fusion_button_4_Template_fusion_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.closeButtonClicked.emit()); });
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵclassMap(ctx_r0.cancelButtonClass);
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0, ctx_r0.notificationFooter));
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", ctx_r0.cancelButtonText, " ");
} }
export class ModalFooterComponent {
    constructor() {
        this.loading = false;
        this.error = '';
        this.saveButtonText = 'Save';
        this.saveButtonClass = 'primary';
        this.saveButtonDisabled = false;
        this.saveButtonLoading = false;
        this.cancelButtonText = 'Cancel';
        this.cancelButtonClass = 'secondary';
        // eslint-disable-next-line
        this.onSave = new EventEmitter();
        // eslint-disable-next-line
        this.closeButtonClicked = new EventEmitter();
    }
    static { this.ɵfac = function ModalFooterComponent_Factory(t) { return new (t || ModalFooterComponent)(); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ModalFooterComponent, selectors: [["fusion-modal-footer"]], inputs: { loading: "loading", error: "error", saveButtonText: "saveButtonText", saveButtonClass: "saveButtonClass", saveButtonDisabled: "saveButtonDisabled", saveButtonLoading: "saveButtonLoading", cancelButtonText: "cancelButtonText", cancelButtonClass: "cancelButtonClass", cancelButtonHidden: "cancelButtonHidden", notificationFooter: "notificationFooter" }, outputs: { onSave: "onSave", closeButtonClicked: "closeButtonClicked" }, decls: 7, vars: 10, consts: [[1, "modal-footer"], [1, "footer"], [1, "fu-error-message"], [3, "class", "ngClass", "click", 4, "ngIf"], [3, "ngClass", "loading", "disabled", "click"], [3, "ngClass", "click"]], template: function ModalFooterComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "span", 2);
            i0.ɵɵtext(3);
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(4, ModalFooterComponent_fusion_button_4_Template, 2, 6, "fusion-button", 3);
            i0.ɵɵelementStart(5, "fusion-button", 4);
            i0.ɵɵlistener("click", function ModalFooterComponent_Template_fusion_button_click_5_listener() { return ctx.onSave.emit(); });
            i0.ɵɵtext(6);
            i0.ɵɵelementEnd()()();
        } if (rf & 2) {
            i0.ɵɵadvance(3);
            i0.ɵɵtextInterpolate(ctx.error);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", !ctx.cancelButtonHidden);
            i0.ɵɵadvance();
            i0.ɵɵclassMap(ctx.saveButtonClass);
            i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0, ctx.notificationFooter))("loading", ctx.saveButtonLoading)("disabled", ctx.saveButtonDisabled || ctx.loading || !!ctx.error);
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate1(" ", ctx.saveButtonText, " ");
        } }, dependencies: [i1.NgClass, i1.NgIf, i2.ButtonComponent], styles: ["[_nghost-%COMP%]   .modal-footer[_ngcontent-%COMP%]   .fu-error-message[_ngcontent-%COMP%]{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]   .modal-footer[_ngcontent-%COMP%]{border-top:solid 1px var(--fu-light-300, #e5e7e9);padding:12px 15px;box-sizing:border-box}[_nghost-%COMP%]   .modal-footer[_ngcontent-%COMP%]   div.footer[_ngcontent-%COMP%]{text-align:right}[_nghost-%COMP%]   .modal-footer[_ngcontent-%COMP%]   div.footer[_ngcontent-%COMP%]   fusion-button[_ngcontent-%COMP%] + fusion-button[_ngcontent-%COMP%]{margin-left:7px}[_nghost-%COMP%]   .modal-footer[_ngcontent-%COMP%]   .fu-error-message[_ngcontent-%COMP%]{font-size:13px;color:var(--fu-negative-500, #ff6a63);margin-right:10px}"] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalFooterComponent, [{
        type: Component,
        args: [{ selector: 'fusion-modal-footer', template: "<div class=\"modal-footer\">\n    <div class=\"footer\">\n        <span class=\"fu-error-message\">{{ error }}</span>\n        <fusion-button\n            [class]=\"cancelButtonClass\"\n            [ngClass]=\"{small: notificationFooter}\"\n            (click)=\"closeButtonClicked.emit()\"\n            *ngIf=\"!cancelButtonHidden\"\n        >\n            {{ cancelButtonText }}\n        </fusion-button>\n        <fusion-button\n            [class]=\"saveButtonClass\"\n            [ngClass]=\"{small: notificationFooter}\"\n            [loading]=\"saveButtonLoading\"\n            [disabled]=\"saveButtonDisabled || loading || !!error\"\n            (click)=\"onSave.emit()\"\n        >\n            {{ saveButtonText }}\n        </fusion-button>\n    </div>\n</div>\n", styles: [":host .modal-footer .fu-error-message{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}:host *{box-sizing:border-box}:host .modal-footer{border-top:solid 1px var(--fu-light-300, #e5e7e9);padding:12px 15px;box-sizing:border-box}:host .modal-footer div.footer{text-align:right}:host .modal-footer div.footer fusion-button+fusion-button{margin-left:7px}:host .modal-footer .fu-error-message{font-size:13px;color:var(--fu-negative-500, #ff6a63);margin-right:10px}\n"] }]
    }], null, { loading: [{
            type: Input
        }], error: [{
            type: Input
        }], saveButtonText: [{
            type: Input
        }], saveButtonClass: [{
            type: Input
        }], saveButtonDisabled: [{
            type: Input
        }], saveButtonLoading: [{
            type: Input
        }], cancelButtonText: [{
            type: Input
        }], cancelButtonClass: [{
            type: Input
        }], cancelButtonHidden: [{
            type: Input
        }], notificationFooter: [{
            type: Input
        }], onSave: [{
            type: Output
        }], closeButtonClicked: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ModalFooterComponent, { className: "ModalFooterComponent", filePath: "components/modal-footer/modal-footer.component.ts", lineNumber: 8 }); })();
//# sourceMappingURL=data:application/json;base64, 