/**
 * Extension of the component Sidebar of the primeng.
 * @author Andres Echeverri <andres.echeverri@alertlogic.com>
 * @copyright 2019 Alert Logic, Inc.
 */
import { animate, state, style, transition, trigger } from '@angular/animations';
import { Component, ContentChild, ElementRef, EventEmitter, Input, Output, Renderer2 } from '@angular/core';
import { Sidebar } from 'primeng-lts/sidebar';
import { AlHeaderTemplateDirective } from './al-header-template.directive';
import { DomHandler } from 'primeng-lts/dom';
import { AlFooterTemplateDirective } from './al-footer-template.directive';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "primeng-lts/button";
const _c0 = function () { return { "ui-sidebar-close ui-corner-all": true }; };
function AlBottomSheetComponent_a_2_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "a", 8);
    i0.ɵɵlistener("click", function AlBottomSheetComponent_a_2_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.close($event); })("keydown.enter", function AlBottomSheetComponent_a_2_Template_a_keydown_enter_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.close($event); });
    i0.ɵɵelement(1, "span", 9);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction0(1, _c0));
} }
function AlBottomSheetComponent_ng_container_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
const _c1 = function (a0) { return { $implicit: a0 }; };
function AlBottomSheetComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, AlBottomSheetComponent_ng_container_3_ng_container_1_Template, 1, 0, "ng-container", 10);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    const _r3 = i0.ɵɵreference(5);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngTemplateOutlet", (ctx_r2.headerTemplate == null ? null : ctx_r2.headerTemplate.templateRef) || _r3)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c1, ctx_r2.target));
} }
const _c2 = function () { return {}; };
function AlBottomSheetComponent_ng_template_4_i_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "i", 19);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r13 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("ngStyle", (ctx_r13.headerOptions == null ? null : ctx_r13.headerOptions.iconStyle) ? ctx_r13.headerOptions == null ? null : ctx_r13.headerOptions.iconStyle : i0.ɵɵpureFunction0(2, _c2));
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r13.headerOptions.icon);
} }
function AlBottomSheetComponent_ng_template_4_i_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 20);
} if (rf & 2) {
    const ctx_r14 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("ngClass", ctx_r14.headerOptions.classIcon)("ngStyle", (ctx_r14.headerOptions == null ? null : ctx_r14.headerOptions.iconStyle) ? ctx_r14.headerOptions == null ? null : ctx_r14.headerOptions.iconStyle : i0.ɵɵpureFunction0(2, _c2));
} }
const _c3 = function (a0) { return { "title-clickable": a0 }; };
function AlBottomSheetComponent_ng_template_4_p_3_Template(rf, ctx) { if (rf & 1) {
    const _r20 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p", 21);
    i0.ɵɵlistener("click", function AlBottomSheetComponent_ng_template_4_p_3_Template_p_click_0_listener() { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(2); return ctx_r19.toggle((ctx_r19.headerOptions == null ? null : ctx_r19.headerOptions.collapsibleFromTitle) ? ctx_r19.headerOptions == null ? null : ctx_r19.headerOptions.collapsibleFromTitle : false); });
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r15 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("ngStyle", (ctx_r15.headerOptions == null ? null : ctx_r15.headerOptions.titleStyle) ? ctx_r15.headerOptions == null ? null : ctx_r15.headerOptions.titleStyle : i0.ɵɵpureFunction0(3, _c2))("ngClass", i0.ɵɵpureFunction1(4, _c3, ctx_r15.headerOptions == null ? null : ctx_r15.headerOptions.collapsibleFromTitle));
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r15.headerOptions.title, " ");
} }
function AlBottomSheetComponent_ng_template_4_button_5_Template(rf, ctx) { if (rf & 1) {
    const _r22 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 22);
    i0.ɵɵlistener("click", function AlBottomSheetComponent_ng_template_4_button_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r22); const ctx_r21 = i0.ɵɵnextContext(2); return ctx_r21.onTertiaryAction.emit(ctx_r21.target); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r16 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("label", ctx_r16.headerOptions == null ? null : ctx_r16.headerOptions.tertiaryAction == null ? null : ctx_r16.headerOptions.tertiaryAction.text)("disabled", ctx_r16.headerOptions == null ? null : ctx_r16.headerOptions.tertiaryAction == null ? null : ctx_r16.headerOptions.tertiaryAction.disabled);
} }
function AlBottomSheetComponent_ng_template_4_button_6_Template(rf, ctx) { if (rf & 1) {
    const _r24 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 23);
    i0.ɵɵlistener("click", function AlBottomSheetComponent_ng_template_4_button_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r24); const ctx_r23 = i0.ɵɵnextContext(2); return ctx_r23.onSecondaryAction.emit(ctx_r23.target); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r17 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("label", ctx_r17.headerOptions == null ? null : ctx_r17.headerOptions.secondaryAction == null ? null : ctx_r17.headerOptions.secondaryAction.text)("disabled", ctx_r17.headerOptions == null ? null : ctx_r17.headerOptions.secondaryAction == null ? null : ctx_r17.headerOptions.secondaryAction.disabled);
} }
function AlBottomSheetComponent_ng_template_4_p_button_7_Template(rf, ctx) { if (rf & 1) {
    const _r26 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p-button", 24);
    i0.ɵɵlistener("onClick", function AlBottomSheetComponent_ng_template_4_p_button_7_Template_p_button_onClick_0_listener() { i0.ɵɵrestoreView(_r26); const ctx_r25 = i0.ɵɵnextContext(2); return ctx_r25.onPrimaryAction.emit(ctx_r25.target); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r18 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("label", ctx_r18.headerOptions == null ? null : ctx_r18.headerOptions.primaryAction == null ? null : ctx_r18.headerOptions.primaryAction.text)("disabled", ctx_r18.headerOptions == null ? null : ctx_r18.headerOptions.primaryAction == null ? null : ctx_r18.headerOptions.primaryAction.disabled);
} }
function AlBottomSheetComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 11);
    i0.ɵɵtemplate(1, AlBottomSheetComponent_ng_template_4_i_1_Template, 2, 3, "i", 12);
    i0.ɵɵtemplate(2, AlBottomSheetComponent_ng_template_4_i_2_Template, 1, 3, "i", 13);
    i0.ɵɵtemplate(3, AlBottomSheetComponent_ng_template_4_p_3_Template, 2, 6, "p", 14);
    i0.ɵɵelement(4, "span", 15);
    i0.ɵɵtemplate(5, AlBottomSheetComponent_ng_template_4_button_5_Template, 1, 2, "button", 16);
    i0.ɵɵtemplate(6, AlBottomSheetComponent_ng_template_4_button_6_Template, 1, 2, "button", 17);
    i0.ɵɵtemplate(7, AlBottomSheetComponent_ng_template_4_p_button_7_Template, 1, 2, "p-button", 18);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r4.headerOptions == null ? null : ctx_r4.headerOptions.icon);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r4.headerOptions == null ? null : ctx_r4.headerOptions.classIcon);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r4.headerOptions == null ? null : ctx_r4.headerOptions.title) !== "");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r4.headerOptions == null ? null : ctx_r4.headerOptions.tertiaryAction);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r4.headerOptions == null ? null : ctx_r4.headerOptions.secondaryAction);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r4.headerOptions == null ? null : ctx_r4.headerOptions.primaryAction);
} }
function AlBottomSheetComponent_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 25);
    i0.ɵɵprojection(1);
    i0.ɵɵelementEnd();
} }
function AlBottomSheetComponent_div_7_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
const _c4 = function (a1) { return { "footer-container": true, "footer-action-buttons": a1 }; };
function AlBottomSheetComponent_div_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 26);
    i0.ɵɵtemplate(1, AlBottomSheetComponent_div_7_ng_container_1_Template, 1, 0, "ng-container", 10);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext();
    const _r7 = i0.ɵɵreference(9);
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c4, ctx_r6.footerOptions));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngTemplateOutlet", (ctx_r6.footerTemplate == null ? null : ctx_r6.footerTemplate.templateRef) || _r7)("ngTemplateOutletContext", i0.ɵɵpureFunction1(5, _c1, ctx_r6.target));
} }
function AlBottomSheetComponent_ng_template_8_button_1_Template(rf, ctx) { if (rf & 1) {
    const _r31 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 31);
    i0.ɵɵlistener("click", function AlBottomSheetComponent_ng_template_8_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r31); const ctx_r30 = i0.ɵɵnextContext(2); return ctx_r30.onSecondaryFooterAction.emit(ctx_r30.target); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r28 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("hidden", ctx_r28.footerOptions == null ? null : ctx_r28.footerOptions.secondaryAction == null ? null : ctx_r28.footerOptions.secondaryAction.hidden)("icon", (ctx_r28.footerOptions == null ? null : ctx_r28.footerOptions.secondaryAction == null ? null : ctx_r28.footerOptions.secondaryAction.icon) ? ctx_r28.footerOptions == null ? null : ctx_r28.footerOptions.secondaryAction == null ? null : ctx_r28.footerOptions.secondaryAction.icon : "")("label", ctx_r28.footerOptions == null ? null : ctx_r28.footerOptions.secondaryAction == null ? null : ctx_r28.footerOptions.secondaryAction.text)("disabled", ctx_r28.footerOptions == null ? null : ctx_r28.footerOptions.secondaryAction == null ? null : ctx_r28.footerOptions.secondaryAction.disabled);
} }
function AlBottomSheetComponent_ng_template_8_button_3_i_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 34);
} }
function AlBottomSheetComponent_ng_template_8_button_3_Template(rf, ctx) { if (rf & 1) {
    const _r34 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 32);
    i0.ɵɵlistener("click", function AlBottomSheetComponent_ng_template_8_button_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r34); const ctx_r33 = i0.ɵɵnextContext(2); return ctx_r33.onPrimaryFooterAction.emit(ctx_r33.target); });
    i0.ɵɵtemplate(1, AlBottomSheetComponent_ng_template_8_button_3_i_1_Template, 1, 0, "i", 33);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r29 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("hidden", ctx_r29.footerOptions == null ? null : ctx_r29.footerOptions.primaryAction == null ? null : ctx_r29.footerOptions.primaryAction.hidden)("icon", (ctx_r29.footerOptions == null ? null : ctx_r29.footerOptions.primaryAction == null ? null : ctx_r29.footerOptions.primaryAction.icon) ? ctx_r29.footerOptions == null ? null : ctx_r29.footerOptions.primaryAction == null ? null : ctx_r29.footerOptions.primaryAction.icon : "")("label", (ctx_r29.footerOptions == null ? null : ctx_r29.footerOptions.primaryAction == null ? null : ctx_r29.footerOptions.primaryAction.loading) ? "" : ctx_r29.footerOptions == null ? null : ctx_r29.footerOptions.primaryAction == null ? null : ctx_r29.footerOptions.primaryAction.text)("disabled", (ctx_r29.footerOptions == null ? null : ctx_r29.footerOptions.primaryAction == null ? null : ctx_r29.footerOptions.primaryAction.loading) || (ctx_r29.footerOptions == null ? null : ctx_r29.footerOptions.primaryAction == null ? null : ctx_r29.footerOptions.primaryAction.disabled));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r29.footerOptions == null ? null : ctx_r29.footerOptions.primaryAction == null ? null : ctx_r29.footerOptions.primaryAction.loading);
} }
function AlBottomSheetComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 27);
    i0.ɵɵtemplate(1, AlBottomSheetComponent_ng_template_8_button_1_Template, 1, 4, "button", 28);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "div", 29);
    i0.ɵɵtemplate(3, AlBottomSheetComponent_ng_template_8_button_3_Template, 2, 5, "button", 30);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r8.footerOptions == null ? null : ctx_r8.footerOptions.secondaryAction);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r8.footerOptions == null ? null : ctx_r8.footerOptions.primaryAction);
} }
const _c5 = function (a1, a3) { return { "ui-sidebar ui-widget ui-widget-content ui-shadow": true, "ui-sidebar-active": a1, "ui-sidebar-bottom ui-sidebar-bottom-center": true, "ui-sidebar-full": a3 }; };
const _c6 = ["*"];
export class AlBottomSheetComponent extends Sidebar {
    constructor(el, renderer) {
        super(el, renderer);
        this.el = el;
        this.renderer = renderer;
        /**
         * Allows define the width of the al-bottom-sheet.
         * The values can be in px, %, vh, rem etc...
         */
        this.width = '95%';
        // Allows to set the heigth of the sidebar when the sidebar is collapse
        this.heightActive = '67px';
        // Allows to set the heigth of the sidebar when the sidebar is open
        this.heightFullScreen = '95vh';
        this.allowContent = true;
        // Emit an event when user clicks on Primary buttom of header
        this.onPrimaryAction = new EventEmitter();
        // Emit an event when user clicks on Secondary buttom of header
        this.onSecondaryAction = new EventEmitter();
        // Emit an event when user clicks on tertiary buttom of header
        this.onTertiaryAction = new EventEmitter();
        this.onPrimaryFooterAction = new EventEmitter();
        this.onSecondaryFooterAction = new EventEmitter();
        this.onOpen = new EventEmitter();
        this.state = 'closed';
    }
    ngOnInit() {
        this.defaultConfig();
        this.setBottomWidth();
    }
    /**
     * Public method to open the bottom sheet
     */
    open(target) {
        this.state = 'opened';
        this.target = target;
        this.visible = true;
        this.fullScreen = true;
        this.setStyleSidebar('overflow-y', 'auto');
        this.setStyleSidebar('height', this.heightFullScreen);
        this.enableModality();
        // add custom class for mask
        DomHandler.addClass(this.mask, 'al-bottom-sheet-mask');
        this.onOpen.emit();
    }
    /**
     * Public method to collapse the bottom sheet
     */
    collapse() {
        this.state = 'collapsed';
        this.visible = true;
        this.fullScreen = false;
        this.setStyleSidebar('overflow-y', 'hidden');
        this.setStyleSidebar('height', this.heightActive);
        this.disableModality();
    }
    /**
     * Override hide method of Sidebar
     * Public method to close the bottom sheet
     */
    hide() {
        // avoid infine loop
        if (this.visible) {
            this.visible = false;
        }
        this.state = 'closed';
        this.fullScreen = false;
        this.disableModality();
    }
    /**
     * Public method allow collapse and show the bottom-sheet
     */
    toggle(blAllowToggle = true) {
        if (blAllowToggle) {
            if (this.visible && this.fullScreen) {
                this.collapse();
            }
            else {
                this.open(this.target);
            }
        }
    }
    /**
     * Center the bottom sheet
     */
    setBottomWidth(width = null) {
        // centering horizontally
        this.width = width !== null && width !== void 0 ? width : this.width;
        this.setStyleSidebar('width', this.width);
        const unit = this.width.replace(/[0-9.]/g, '');
        const w = parseFloat(this.width);
        this.setStyleSidebar('margin-left', `-${(w / 2)}${unit}`);
    }
    /**
     * Set default config for p-sidebar
     */
    defaultConfig() {
        this.appendTo = 'body';
        this.dismissible = false;
        this.blockScroll = true;
        this.showCloseIcon = false;
    }
    /**
     * Set styles of the sidebar
     * @param property is a property of css (height, width, margin, etc....)
     * @param value the value of the porpety
     */
    setStyleSidebar(property, value) {
        const elm = this.el.nativeElement.firstChild ? this.el.nativeElement.firstChild : this.containerViewChild.nativeElement;
        this.renderer.setStyle(elm, property, value);
    }
}
/** @nocollapse */ AlBottomSheetComponent.ɵfac = function AlBottomSheetComponent_Factory(t) { return new (t || AlBottomSheetComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2)); };
/** @nocollapse */ AlBottomSheetComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlBottomSheetComponent, selectors: [["al-bottom-sheet"]], contentQueries: function AlBottomSheetComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
        i0.ɵɵcontentQuery(dirIndex, AlHeaderTemplateDirective, true);
        i0.ɵɵcontentQuery(dirIndex, AlFooterTemplateDirective, true);
    } if (rf & 2) {
        var _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.headerTemplate = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.footerTemplate = _t.first);
    } }, inputs: { width: "width", heightActive: "heightActive", heightFullScreen: "heightFullScreen", allowContent: "allowContent", headerOptions: "headerOptions", footerOptions: "footerOptions", target: "target" }, outputs: { onPrimaryAction: "onPrimaryAction", onSecondaryAction: "onSecondaryAction", onTertiaryAction: "onTertiaryAction", onPrimaryFooterAction: "onPrimaryFooterAction", onSecondaryFooterAction: "onSecondaryFooterAction", onOpen: "onOpen" }, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c6, decls: 10, vars: 12, consts: [[3, "ngClass", "ngStyle"], ["container", ""], ["tabindex", "0", "role", "button", 3, "ngClass", "click", "keydown.enter", 4, "ngIf"], [4, "ngIf"], ["defaultHeaderTemplate", ""], ["class", "container", 4, "ngIf"], [3, "ngClass", 4, "ngIf"], ["defaultFooterTemplate", ""], ["tabindex", "0", "role", "button", 3, "ngClass", "click", "keydown.enter"], [1, "pi", "pi-times"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "p-grid", "p-align-center", "header"], ["class", "material-icons", 3, "ngStyle", 4, "ngIf"], ["class", "class-icon", 3, "ngClass", "ngStyle", 4, "ngIf"], [3, "ngStyle", "ngClass", "click", 4, "ngIf"], [1, "p-col"], ["pButton", "", "class", "flat", "type", "button", 3, "label", "disabled", "click", 4, "ngIf"], ["pButton", "", "class", "flat secundary-action", "type", "button", 3, "label", "disabled", "click", 4, "ngIf"], ["class", "primaryAction", "styleClass", "primaryAction", 3, "label", "disabled", "onClick", 4, "ngIf"], [1, "material-icons", 3, "ngStyle"], [1, "class-icon", 3, "ngClass", "ngStyle"], [3, "ngStyle", "ngClass", "click"], ["pButton", "", "type", "button", 1, "flat", 3, "label", "disabled", "click"], ["pButton", "", "type", "button", 1, "flat", "secundary-action", 3, "label", "disabled", "click"], ["styleClass", "primaryAction", 1, "primaryAction", 3, "label", "disabled", "onClick"], [1, "container"], [3, "ngClass"], [1, "secondary-footer-action"], ["pButton", "", "class", "flat secundary-action", "type", "button", 3, "hidden", "icon", "label", "disabled", "click", 4, "ngIf"], [1, "primary-footer-action"], ["pButton", "", "class", "primaryAction", "styleClass", "primaryAction", 3, "hidden", "icon", "label", "disabled", "click", 4, "ngIf"], ["pButton", "", "type", "button", 1, "flat", "secundary-action", 3, "hidden", "icon", "label", "disabled", "click"], ["pButton", "", "styleClass", "primaryAction", 1, "primaryAction", 3, "hidden", "icon", "label", "disabled", "click"], ["class", "pi pi-spin pi-spinner", 4, "ngIf"], [1, "pi", "pi-spin", "pi-spinner"]], template: function AlBottomSheetComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵprojectionDef();
        i0.ɵɵelementStart(0, "div", 0, 1);
        i0.ɵɵtemplate(2, AlBottomSheetComponent_a_2_Template, 2, 2, "a", 2);
        i0.ɵɵtemplate(3, AlBottomSheetComponent_ng_container_3_Template, 2, 4, "ng-container", 3);
        i0.ɵɵtemplate(4, AlBottomSheetComponent_ng_template_4_Template, 8, 6, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor);
        i0.ɵɵtemplate(6, AlBottomSheetComponent_div_6_Template, 2, 0, "div", 5);
        i0.ɵɵtemplate(7, AlBottomSheetComponent_div_7_Template, 2, 7, "div", 6);
        i0.ɵɵtemplate(8, AlBottomSheetComponent_ng_template_8_Template, 4, 2, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵclassMap(ctx.styleClass);
        i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(9, _c5, ctx.visible, ctx.fullScreen))("@panelState", ctx.state === "opened" || ctx.state === "collapsed" ? "visible" : "hidden")("ngStyle", ctx.style);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.showCloseIcon);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.headerOptions || (ctx.headerTemplate == null ? null : ctx.headerTemplate.templateRef));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.allowContent);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.footerOptions || (ctx.footerTemplate == null ? null : ctx.footerTemplate.templateRef));
    } }, directives: [i1.NgClass, i1.NgStyle, i1.NgIf, i1.NgTemplateOutlet, i2.ButtonDirective, i2.Button], styles: [".ui-sidebar-bottom-center[_ngcontent-%COMP%]{width:95%;left:50%;margin-left:-47.5%}.header[_ngcontent-%COMP%]{position:sticky;top:0;z-index:1000;padding:15px 40px;border-bottom:1px solid #cbcbcb;background-color:#fff;margin:0}.header[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:28px;margin:5px 0 5px 12px;letter-spacing:0;color:#535353}.header[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-left:12px}.ui-sidebar[_ngcontent-%COMP%]{padding:0}.title-clickable[_ngcontent-%COMP%]{cursor:pointer}.container[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;height:86vh;padding:30px}.secundary-action[_ngcontent-%COMP%]{margin-right:.5em}.footer-container[_ngcontent-%COMP%]{border-top:1px solid #cbcbcb;background:#fff;position:absolute!important;width:100%;bottom:0}.footer-action-buttons[_ngcontent-%COMP%]{display:flex;position:absolute!important;width:100%;min-height:56px;align-items:center;bottom:0;justify-content:space-between;padding:0 50px}.primary-footer-action[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.primary-footer-action[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   i.pi.pi-spin.pi-spinner[_ngcontent-%COMP%]{font-size:24px}.secondary-footer-action[_ngcontent-%COMP%]{display:flex;align-items:center}.secondary-footer-action[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{cursor:pointer;font-size:18px}"], data: { animation: [
            trigger('panelState', [
                state('hidden', style({
                    opacity: 0
                })),
                state('visible', style({
                    opacity: 1
                })),
                transition('visible => hidden', animate('300ms ease-in')),
                transition('hidden => visible', animate('300ms ease-out'))
            ])
        ] } });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AlBottomSheetComponent, [{
        type: Component,
        args: [{
                selector: 'al-bottom-sheet',
                templateUrl: './al-bottom-sheet.component.html',
                styleUrls: ['./al-bottom-sheet.component.scss'],
                animations: [
                    trigger('panelState', [
                        state('hidden', style({
                            opacity: 0
                        })),
                        state('visible', style({
                            opacity: 1
                        })),
                        transition('visible => hidden', animate('300ms ease-in')),
                        transition('hidden => visible', animate('300ms ease-out'))
                    ])
                ]
            }]
    }], function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, { width: [{
            type: Input
        }], heightActive: [{
            type: Input
        }], heightFullScreen: [{
            type: Input
        }], allowContent: [{
            type: Input
        }], headerOptions: [{
            type: Input
        }], footerOptions: [{
            type: Input
        }], target: [{
            type: Input
        }], onPrimaryAction: [{
            type: Output
        }], onSecondaryAction: [{
            type: Output
        }], onTertiaryAction: [{
            type: Output
        }], onPrimaryFooterAction: [{
            type: Output
        }], onSecondaryFooterAction: [{
            type: Output
        }], onOpen: [{
            type: Output
        }], headerTemplate: [{
            type: ContentChild,
            args: [AlHeaderTemplateDirective]
        }], footerTemplate: [{
            type: ContentChild,
            args: [AlFooterTemplateDirective]
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 