import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "primeng-lts/tooltip";
import * as i3 from "primeng-lts/inputswitch";
import * as i4 from "@angular/forms";
var _c0 = function (a0) { return { "disabled": a0 }; };
function AlActionSnackbarComponent_div_0_ng_container_5_div_1_Template(rf, ctx) { if (rf & 1) {
    var _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 8);
    i0.ɵɵlistener("click", function AlActionSnackbarComponent_div_0_ng_container_5_div_1_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r7); var element_r2 = i0.ɵɵnextContext().$implicit; var ctx_r5 = i0.ɵɵnextContext(2); return !element_r2.disabled ? ctx_r5.actionSelected(element_r2.event) : null; });
    i0.ɵɵelementStart(1, "i", 9);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 10);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var element_r2 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0, element_r2.disabled))("pTooltip", element_r2.tooltip || "");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", element_r2.icon, " ");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(element_r2.text);
} }
function AlActionSnackbarComponent_div_0_ng_container_5_div_2_Template(rf, ctx) { if (rf & 1) {
    var _r11 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 11);
    i0.ɵɵelementStart(1, "p-inputSwitch", 12);
    i0.ɵɵlistener("ngModelChange", function AlActionSnackbarComponent_div_0_ng_container_5_div_2_Template_p_inputSwitch_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r11); var element_r2 = i0.ɵɵnextContext().$implicit; return element_r2.checked = $event; })("onChange", function AlActionSnackbarComponent_div_0_ng_container_5_div_2_Template_p_inputSwitch_onChange_1_listener() { i0.ɵɵrestoreView(_r11); var element_r2 = i0.ɵɵnextContext().$implicit; var ctx_r12 = i0.ɵɵnextContext(2); return ctx_r12.actionSelected(element_r2.event); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "div", 10);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var element_r2 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngModel", element_r2.checked);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(element_r2.text);
} }
function AlActionSnackbarComponent_div_0_ng_container_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, AlActionSnackbarComponent_div_0_ng_container_5_div_1_Template, 5, 6, "div", 6);
    i0.ɵɵtemplate(2, AlActionSnackbarComponent_div_0_ng_container_5_div_2_Template, 4, 2, "div", 7);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    var element_r2 = ctx.$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", element_r2.type === "button" && element_r2.visible);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", element_r2.type === "input_switch" && element_r2.visible);
} }
function AlActionSnackbarComponent_div_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 1);
    i0.ɵɵelementStart(1, "div", 2);
    i0.ɵɵelementStart(2, "div", 3);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 4);
    i0.ɵɵtemplate(5, AlActionSnackbarComponent_div_0_ng_container_5_Template, 3, 2, "ng-container", 5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(ctx_r0.text);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngForOf", ctx_r0.elements);
} }
var AlActionSnackbarComponent = /** @class */ (function () {
    function AlActionSnackbarComponent() {
        this.visible = false;
        this.onElementPressed = new EventEmitter();
    }
    AlActionSnackbarComponent.prototype.actionSelected = function (event) {
        this.onElementPressed.emit(event);
    };
    /** @nocollapse */ AlActionSnackbarComponent.ɵfac = function AlActionSnackbarComponent_Factory(t) { return new (t || AlActionSnackbarComponent)(); };
    /** @nocollapse */ AlActionSnackbarComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlActionSnackbarComponent, selectors: [["al-action-snackbar"]], inputs: { text: "text", visible: "visible", elements: "elements" }, outputs: { onElementPressed: "onElementPressed" }, decls: 1, vars: 1, consts: [["class", "al-action-snackbar", 4, "ngIf"], [1, "al-action-snackbar"], [1, "al-action-snackbar-content"], [1, "text"], [1, "elements"], [4, "ngFor", "ngForOf"], ["class", "action-element", 3, "ngClass", "pTooltip", "click", 4, "ngIf"], ["class", "switch", 4, "ngIf"], [1, "action-element", 3, "ngClass", "pTooltip", "click"], [1, "material-icons", "icon"], [1, "label"], [1, "switch"], [1, "action-element", 3, "ngModel", "ngModelChange", "onChange"]], template: function AlActionSnackbarComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵtemplate(0, AlActionSnackbarComponent_div_0_Template, 6, 2, "div", 0);
        } if (rf & 2) {
            i0.ɵɵproperty("ngIf", ctx.visible);
        } }, directives: [i1.NgIf, i1.NgForOf, i1.NgClass, i2.Tooltip, i3.InputSwitch, i4.NgControlStatus, i4.NgModel], styles: [".al-action-snackbar[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;width:100%;height:51px;color:#fff;text-align:center;z-index:100}.al-action-snackbar[_ngcontent-%COMP%]   .al-action-snackbar-content[_ngcontent-%COMP%]{position:relative;width:65%;height:51px;background-color:#4b8cbd;margin:0 auto;display:flex;padding:0 0 0 var(--ald-g-space-6);justify-content:space-between;box-shadow:0 3px 6px #00000066;border-radius:var(--ald-g-radius-sm)}.al-action-snackbar[_ngcontent-%COMP%]   .al-action-snackbar-content[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{align-self:center}.al-action-snackbar[_ngcontent-%COMP%]   .al-action-snackbar-content[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-size:16px}.al-action-snackbar[_ngcontent-%COMP%]   .al-action-snackbar-content[_ngcontent-%COMP%]   .elements[_ngcontent-%COMP%]{display:flex}.al-action-snackbar[_ngcontent-%COMP%]   .al-action-snackbar-content[_ngcontent-%COMP%]   .elements[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{font-size:10px;text-transform:uppercase}.al-action-snackbar[_ngcontent-%COMP%]   .al-action-snackbar-content[_ngcontent-%COMP%]   .elements[_ngcontent-%COMP%]   .switch[_ngcontent-%COMP%]{margin-top:7px}.al-action-snackbar[_ngcontent-%COMP%]   .al-action-snackbar-content[_ngcontent-%COMP%]   .elements[_ngcontent-%COMP%]   .action-element[_ngcontent-%COMP%]{line-height:1;margin:0 10px;cursor:pointer}.al-action-snackbar[_ngcontent-%COMP%]   .al-action-snackbar-content[_ngcontent-%COMP%]   .elements[_ngcontent-%COMP%]   .action-element[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{font-size:24px}.al-action-snackbar[_ngcontent-%COMP%]   .al-action-snackbar-content[_ngcontent-%COMP%]   .elements[_ngcontent-%COMP%]   .action-element.disabled[_ngcontent-%COMP%]{opacity:.5}"] });
    return AlActionSnackbarComponent;
}());
export { AlActionSnackbarComponent };
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AlActionSnackbarComponent, [{
        type: Component,
        args: [{
                selector: 'al-action-snackbar',
                templateUrl: './al-action-snackbar.component.html',
                styleUrls: ['./al-action-snackbar.component.scss']
            }]
    }], null, { text: [{
            type: Input
        }], visible: [{
            type: Input
        }], elements: [{
            type: Input
        }], onElementPressed: [{
            type: Output
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 