import { Component, ViewEncapsulation } from '@angular/core';
import * as i0 from "@angular/core";
export class ConfirmationCaptureComponent {
    constructor() {
        /**
         * Whether or not the confirmation capture is entering into view.
         *
         * @private Used by template.
         */
        this._enter = false;
        /**
         * Whether or not the notification is entering into view.
         *
         * @private Used by template.
         */
        this._theme = 'light';
        /**
         * Whether or not clicking on the backdrop will dismiss the confirmation capture.
         */
        this._dismissible = true;
    }
    open(confirmationCaptureConfiguration) {
        const defaultTheme = 'light';
        const defaultCancelButtonLabel = 'Cancel';
        const defaultConfirmButtonLabel = 'Confirm';
        this._cancelButtonLabel = confirmationCaptureConfiguration.cancelButtonLabel || defaultCancelButtonLabel;
        this._className = confirmationCaptureConfiguration.className;
        this._confirmButtonLabel = confirmationCaptureConfiguration.confirmButtonLabel || defaultConfirmButtonLabel;
        this._content = confirmationCaptureConfiguration.content;
        this._dismissible =
            confirmationCaptureConfiguration.dismissible !== undefined
                ? confirmationCaptureConfiguration.dismissible
                : this._dismissible;
        this._theme = confirmationCaptureConfiguration.theme || defaultTheme;
        this._enter = true;
    }
    setOnConfirmListener(fn) {
        this._onConfirmListener = fn;
    }
    setOnCancelListener(fn) {
        this._onCancelListener = fn;
    }
    /**
     * @private Used by template.
     */
    _onBackdropPointerUp() {
        if (this._dismissible) {
            this._enter = false;
            this._onCancelListener?.();
        }
    }
    /**
     * @private Used by template.
     */
    _onCancel() {
        this._enter = false;
        this._onCancelListener?.();
    }
    /**
     * @private Used by template.
     */
    _onConfirm() {
        this._enter = false;
        this._onConfirmListener?.();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ConfirmationCaptureComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: ConfirmationCaptureComponent, selector: "bbb-confirmation-capture", host: { properties: { "class": "\"bbb-confirmation-capture \" + (_theme + \" \") + (_enter ? \"enter\" : \"leave\") + (_className ? \" \" + _className : \"\")" } }, ngImport: i0, template: "<div\n    class=\"bbb-confirmation-capture__backdrop\"\n    (pointerup)=\"_onBackdropPointerUp()\"></div>\n\n<div class=\"bbb-confirmation-capture__body\">\n    <span\n        class=\"bbb-confirmation-capture__content\"\n        [innerHTML]=\"_content\"></span>\n\n    <div class=\"bbb-confirmation-capture__action-container\">\n        <button\n            type=\"button\"\n            class=\"bbb-confirmation-capture__action cancel\"\n            (click)=\"_onCancel()\">\n            {{ _cancelButtonLabel }}\n        </button>\n        <button\n            type=\"button\"\n            class=\"bbb-confirmation-capture__action confirm\"\n            (click)=\"_onConfirm()\">\n            {{ _confirmButtonLabel }}\n        </button>\n    </div>\n</div>\n", styles: [".bbb-confirmation-capture,.bbb-confirmation-capture__backdrop{position:fixed;width:100vw;height:100vh;left:0;top:0}.bbb-confirmation-capture{display:flex;align-items:flex-end;justify-content:center;z-index:9999;animation:.25s cubic-bezier(.04,.54,.25,1) forwards}.bbb-confirmation-capture.enter .bbb-confirmation-capture__body{animation-name:confirmation-capture-animate-body-enter}.bbb-confirmation-capture.leave .bbb-confirmation-capture__body{animation-name:confirmation-capture-animate-body-leave}.bbb-confirmation-capture.light{--confirmation-capture-bg-color: #fff;--confirmation-capture-text-color: #000;--confirmation-capture-shadow: 0px .5rem .75rem rgba(0, 0, 0, .08), 0px .25rem 3rem rgba(0, 0, 0, .08);--confirmation-capture-cancel-btn-hover-bg-color: #f7f5f5;--confirmation-capture-cancel-btn-text-color: #000;--confirmation-capture-confirm-btn-bg-color: #7ea1aa;--confirmation-capture-confirm-btn-hover-bg-color: #607b82;--confirmation-capture-confirm-btn-text-color: #fff;--confirmation-capture-divider-color: rgba(0, 0, 0, .04)}.bbb-confirmation-capture.dark{--confirmation-capture-bg-color: #353535;--confirmation-capture-text-color: #fff;--confirmation-capture-shadow: 0px .5rem .75rem rgba(0, 0, 0, .15), 0px .25rem 3rem rgba(0, 0, 0, .15);--confirmation-capture-cancel-btn-hover-bg-color: #444;--confirmation-capture-cancel-btn-text-color: #e8d0ff;--confirmation-capture-confirm-btn-bg-color: #1d6069;--confirmation-capture-confirm-btn-hover-bg-color: #277e8a;--confirmation-capture-confirm-btn-text-color: #fff;--confirmation-capture-divider-color: rgba(255, 255, 255, .08)}@keyframes confirmation-capture-animate-body-enter{0%{transform:translateY(60%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes confirmation-capture-animate-body-leave{0%{transform:translateY(0);opacity:1}to{transform:translateY(60%);opacity:0}}.bbb-confirmation-capture__body{position:fixed;bottom:20px;display:flex;align-items:center;box-sizing:border-box;min-height:60px;border-radius:5px;z-index:10000;animation:.25s cubic-bezier(.04,.54,.25,1) forwards;max-width:95vw;line-height:20px;backface-visibility:hidden;background-color:var(--confirmation-capture-bg-color);box-shadow:var(--confirmation-capture-shadow);color:var(--confirmation-capture-text-color);font-size:1.1rem}.bbb-confirmation-capture__content{padding:20px 20px 20px 15px;border-right:1px solid var(--confirmation-capture-divider-color);max-width:450px;min-width:300px;box-sizing:border-box}.bbb-confirmation-capture__action-container{display:flex;flex-wrap:nowrap;justify-content:center;align-items:center;padding:5px 15px 5px 5px}.bbb-confirmation-capture__action{background-color:transparent;border:none;font-size:.95rem;cursor:pointer;border-radius:4px;padding:8px 15px;transition:background-color .25s cubic-bezier(.04,.54,.25,1);font-family:inherit;white-space:nowrap}.bbb-confirmation-capture__action.cancel{color:var(--confirmation-capture-cancel-btn-text-color)}.bbb-confirmation-capture__action.cancel:hover{background-color:var(--confirmation-capture-cancel-btn-hover-bg-color)}.bbb-confirmation-capture__action.confirm{margin-left:10px;background-color:var(--confirmation-capture-confirm-btn-bg-color);color:var(--confirmation-capture-confirm-btn-text-color)}.bbb-confirmation-capture__action.confirm:hover{background-color:var(--confirmation-capture-confirm-btn-hover-bg-color)}@media (max-width: 510px){.bbb-confirmation-capture__content{min-width:auto}}\n"], encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: ConfirmationCaptureComponent, decorators: [{
            type: Component,
            args: [{ encapsulation: ViewEncapsulation.None, host: {
                        '[class]': 
                        // eslint-disable-next-line max-len
                        '"bbb-confirmation-capture " + (_theme + " ") + (_enter ? "enter" : "leave") + (_className ? " " + _className : "")'
                    }, selector: 'bbb-confirmation-capture', template: "<div\n    class=\"bbb-confirmation-capture__backdrop\"\n    (pointerup)=\"_onBackdropPointerUp()\"></div>\n\n<div class=\"bbb-confirmation-capture__body\">\n    <span\n        class=\"bbb-confirmation-capture__content\"\n        [innerHTML]=\"_content\"></span>\n\n    <div class=\"bbb-confirmation-capture__action-container\">\n        <button\n            type=\"button\"\n            class=\"bbb-confirmation-capture__action cancel\"\n            (click)=\"_onCancel()\">\n            {{ _cancelButtonLabel }}\n        </button>\n        <button\n            type=\"button\"\n            class=\"bbb-confirmation-capture__action confirm\"\n            (click)=\"_onConfirm()\">\n            {{ _confirmButtonLabel }}\n        </button>\n    </div>\n</div>\n", styles: [".bbb-confirmation-capture,.bbb-confirmation-capture__backdrop{position:fixed;width:100vw;height:100vh;left:0;top:0}.bbb-confirmation-capture{display:flex;align-items:flex-end;justify-content:center;z-index:9999;animation:.25s cubic-bezier(.04,.54,.25,1) forwards}.bbb-confirmation-capture.enter .bbb-confirmation-capture__body{animation-name:confirmation-capture-animate-body-enter}.bbb-confirmation-capture.leave .bbb-confirmation-capture__body{animation-name:confirmation-capture-animate-body-leave}.bbb-confirmation-capture.light{--confirmation-capture-bg-color: #fff;--confirmation-capture-text-color: #000;--confirmation-capture-shadow: 0px .5rem .75rem rgba(0, 0, 0, .08), 0px .25rem 3rem rgba(0, 0, 0, .08);--confirmation-capture-cancel-btn-hover-bg-color: #f7f5f5;--confirmation-capture-cancel-btn-text-color: #000;--confirmation-capture-confirm-btn-bg-color: #7ea1aa;--confirmation-capture-confirm-btn-hover-bg-color: #607b82;--confirmation-capture-confirm-btn-text-color: #fff;--confirmation-capture-divider-color: rgba(0, 0, 0, .04)}.bbb-confirmation-capture.dark{--confirmation-capture-bg-color: #353535;--confirmation-capture-text-color: #fff;--confirmation-capture-shadow: 0px .5rem .75rem rgba(0, 0, 0, .15), 0px .25rem 3rem rgba(0, 0, 0, .15);--confirmation-capture-cancel-btn-hover-bg-color: #444;--confirmation-capture-cancel-btn-text-color: #e8d0ff;--confirmation-capture-confirm-btn-bg-color: #1d6069;--confirmation-capture-confirm-btn-hover-bg-color: #277e8a;--confirmation-capture-confirm-btn-text-color: #fff;--confirmation-capture-divider-color: rgba(255, 255, 255, .08)}@keyframes confirmation-capture-animate-body-enter{0%{transform:translateY(60%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes confirmation-capture-animate-body-leave{0%{transform:translateY(0);opacity:1}to{transform:translateY(60%);opacity:0}}.bbb-confirmation-capture__body{position:fixed;bottom:20px;display:flex;align-items:center;box-sizing:border-box;min-height:60px;border-radius:5px;z-index:10000;animation:.25s cubic-bezier(.04,.54,.25,1) forwards;max-width:95vw;line-height:20px;backface-visibility:hidden;background-color:var(--confirmation-capture-bg-color);box-shadow:var(--confirmation-capture-shadow);color:var(--confirmation-capture-text-color);font-size:1.1rem}.bbb-confirmation-capture__content{padding:20px 20px 20px 15px;border-right:1px solid var(--confirmation-capture-divider-color);max-width:450px;min-width:300px;box-sizing:border-box}.bbb-confirmation-capture__action-container{display:flex;flex-wrap:nowrap;justify-content:center;align-items:center;padding:5px 15px 5px 5px}.bbb-confirmation-capture__action{background-color:transparent;border:none;font-size:.95rem;cursor:pointer;border-radius:4px;padding:8px 15px;transition:background-color .25s cubic-bezier(.04,.54,.25,1);font-family:inherit;white-space:nowrap}.bbb-confirmation-capture__action.cancel{color:var(--confirmation-capture-cancel-btn-text-color)}.bbb-confirmation-capture__action.cancel:hover{background-color:var(--confirmation-capture-cancel-btn-hover-bg-color)}.bbb-confirmation-capture__action.confirm{margin-left:10px;background-color:var(--confirmation-capture-confirm-btn-bg-color);color:var(--confirmation-capture-confirm-btn-text-color)}.bbb-confirmation-capture__action.confirm:hover{background-color:var(--confirmation-capture-confirm-btn-hover-bg-color)}@media (max-width: 510px){.bbb-confirmation-capture__content{min-width:auto}}\n"] }]
        }] });
//# sourceMappingURL=data:application/json;base64, 