import * as i0 from '@angular/core';
import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import { FadeInOutAnimation } from '@mintplayer/ng-animations';
import { Color } from '@mintplayer/ng-bootstrap';

class BsAlertComponent {
    constructor() {
        this.type = Color.primary;
        this.colors = Color;
        //#region IsVisible
        this._isVisible = true;
        this.isVisibleChange = new EventEmitter();
        //#endregion
        this.afterOpenedOrClosed = new EventEmitter();
    }
    get isVisible() {
        return this._isVisible;
    }
    set isVisible(value) {
        this._isVisible = value;
        this.isVisibleChange.emit(value);
    }
    onAfterOpenedOrClosed(isVisible) {
        this.afterOpenedOrClosed.emit(isVisible);
    }
}
BsAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
BsAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: BsAlertComponent, selector: "bs-alert", inputs: { type: "type", isVisible: "isVisible" }, outputs: { isVisibleChange: "isVisibleChange", afterOpenedOrClosed: "afterOpenedOrClosed" }, ngImport: i0, template: "<div class=\"mb-3 overflow-hidden\" *ngIf=\"isVisible\" [@fadeInOut] (@fadeInOut.done)=\"onAfterOpenedOrClosed(isVisible)\">\n    <div class=\"alert mb-0\" [ngClass]=\"'alert-' + colors[type]\">\n        <ng-content></ng-content>\n    </div>\n</div>", styles: [":host ::ng-deep .alert{--bs-alert-bg: transparent;--bs-alert-padding-x: 1rem;--bs-alert-padding-y: 1rem;--bs-alert-margin-bottom: 1rem;--bs-alert-color: inherit;--bs-alert-border-color: transparent;--bs-alert-border: 1px solid var(--bs-alert-border-color);--bs-alert-border-radius: .375rem;position:relative;padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);margin-bottom:var(--bs-alert-margin-bottom);color:var(--bs-alert-color);background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius)}:host ::ng-deep .alert-heading{color:inherit}:host ::ng-deep .alert-link{font-weight:700}:host ::ng-deep .alert-dismissible{padding-right:3rem}:host ::ng-deep .alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}:host ::ng-deep .alert-primary{--bs-alert-color: #084298;--bs-alert-bg: #cfe2ff;--bs-alert-border-color: #b6d4fe}:host ::ng-deep .alert-primary .alert-link{color:#06357a}:host ::ng-deep .alert-secondary{--bs-alert-color: #41464b;--bs-alert-bg: #e2e3e5;--bs-alert-border-color: #d3d6d8}:host ::ng-deep .alert-secondary .alert-link{color:#34383c}:host ::ng-deep .alert-success{--bs-alert-color: #0f5132;--bs-alert-bg: #d1e7dd;--bs-alert-border-color: #badbcc}:host ::ng-deep .alert-success .alert-link{color:#0c4128}:host ::ng-deep .alert-info{--bs-alert-color: #055160;--bs-alert-bg: #cff4fc;--bs-alert-border-color: #b6effb}:host ::ng-deep .alert-info .alert-link{color:#04414d}:host ::ng-deep .alert-warning{--bs-alert-color: #664d03;--bs-alert-bg: #fff3cd;--bs-alert-border-color: #ffecb5}:host ::ng-deep .alert-warning .alert-link{color:#523e02}:host ::ng-deep .alert-danger{--bs-alert-color: #842029;--bs-alert-bg: #f8d7da;--bs-alert-border-color: #f5c2c7}:host ::ng-deep .alert-danger .alert-link{color:#6a1a21}:host ::ng-deep .alert-light{--bs-alert-color: #636464;--bs-alert-bg: #fefefe;--bs-alert-border-color: #fdfdfe}:host ::ng-deep .alert-light .alert-link{color:#4f5050}:host ::ng-deep .alert-dark{--bs-alert-color: #141619;--bs-alert-bg: #d3d3d4;--bs-alert-border-color: #bcbebf}:host ::ng-deep .alert-dark .alert-link{color:#101214}:host ::ng-deep .alert .btn{bottom:0;display:inline-flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [FadeInOutAnimation] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsAlertComponent, decorators: [{
            type: Component,
            args: [{ selector: 'bs-alert', animations: [FadeInOutAnimation], template: "<div class=\"mb-3 overflow-hidden\" *ngIf=\"isVisible\" [@fadeInOut] (@fadeInOut.done)=\"onAfterOpenedOrClosed(isVisible)\">\n    <div class=\"alert mb-0\" [ngClass]=\"'alert-' + colors[type]\">\n        <ng-content></ng-content>\n    </div>\n</div>", styles: [":host ::ng-deep .alert{--bs-alert-bg: transparent;--bs-alert-padding-x: 1rem;--bs-alert-padding-y: 1rem;--bs-alert-margin-bottom: 1rem;--bs-alert-color: inherit;--bs-alert-border-color: transparent;--bs-alert-border: 1px solid var(--bs-alert-border-color);--bs-alert-border-radius: .375rem;position:relative;padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);margin-bottom:var(--bs-alert-margin-bottom);color:var(--bs-alert-color);background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius)}:host ::ng-deep .alert-heading{color:inherit}:host ::ng-deep .alert-link{font-weight:700}:host ::ng-deep .alert-dismissible{padding-right:3rem}:host ::ng-deep .alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}:host ::ng-deep .alert-primary{--bs-alert-color: #084298;--bs-alert-bg: #cfe2ff;--bs-alert-border-color: #b6d4fe}:host ::ng-deep .alert-primary .alert-link{color:#06357a}:host ::ng-deep .alert-secondary{--bs-alert-color: #41464b;--bs-alert-bg: #e2e3e5;--bs-alert-border-color: #d3d6d8}:host ::ng-deep .alert-secondary .alert-link{color:#34383c}:host ::ng-deep .alert-success{--bs-alert-color: #0f5132;--bs-alert-bg: #d1e7dd;--bs-alert-border-color: #badbcc}:host ::ng-deep .alert-success .alert-link{color:#0c4128}:host ::ng-deep .alert-info{--bs-alert-color: #055160;--bs-alert-bg: #cff4fc;--bs-alert-border-color: #b6effb}:host ::ng-deep .alert-info .alert-link{color:#04414d}:host ::ng-deep .alert-warning{--bs-alert-color: #664d03;--bs-alert-bg: #fff3cd;--bs-alert-border-color: #ffecb5}:host ::ng-deep .alert-warning .alert-link{color:#523e02}:host ::ng-deep .alert-danger{--bs-alert-color: #842029;--bs-alert-bg: #f8d7da;--bs-alert-border-color: #f5c2c7}:host ::ng-deep .alert-danger .alert-link{color:#6a1a21}:host ::ng-deep .alert-light{--bs-alert-color: #636464;--bs-alert-bg: #fefefe;--bs-alert-border-color: #fdfdfe}:host ::ng-deep .alert-light .alert-link{color:#4f5050}:host ::ng-deep .alert-dark{--bs-alert-color: #141619;--bs-alert-bg: #d3d3d4;--bs-alert-border-color: #bcbebf}:host ::ng-deep .alert-dark .alert-link{color:#101214}:host ::ng-deep .alert .btn{bottom:0;display:inline-flex;align-items:center}\n"] }]
        }], propDecorators: { type: [{
                type: Input
            }], isVisible: [{
                type: Input
            }], isVisibleChange: [{
                type: Output
            }], afterOpenedOrClosed: [{
                type: Output
            }] } });

class BsAlertCloseComponent {
    constructor(alert) {
        this.alert = alert;
    }
    closeAlert() {
        this.alert.isVisible = false;
        return false;
    }
}
BsAlertCloseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsAlertCloseComponent, deps: [{ token: BsAlertComponent }], target: i0.ɵɵFactoryTarget.Component });
BsAlertCloseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: BsAlertCloseComponent, selector: "bs-alert-close", ngImport: i0, template: "<button class=\"btn float-end\" (click)=\"closeAlert()\">\n    <span class=\"text-dark\">\u00D7</span>\n</button>", styles: ["button{top:0;right:0;border:0;position:absolute;padding:.75rem 1.25rem!important;background:transparent}\n"] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsAlertCloseComponent, decorators: [{
            type: Component,
            args: [{ selector: 'bs-alert-close', template: "<button class=\"btn float-end\" (click)=\"closeAlert()\">\n    <span class=\"text-dark\">\u00D7</span>\n</button>", styles: ["button{top:0;right:0;border:0;position:absolute;padding:.75rem 1.25rem!important;background:transparent}\n"] }]
        }], ctorParameters: function () { return [{ type: BsAlertComponent }]; } });

class BsAlertModule {
}
BsAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
BsAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: BsAlertModule, declarations: [BsAlertComponent,
        BsAlertCloseComponent], imports: [CommonModule], exports: [BsAlertComponent,
        BsAlertCloseComponent] });
BsAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsAlertModule, imports: [CommonModule] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsAlertModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule],
                    declarations: [
                        BsAlertComponent,
                        BsAlertCloseComponent
                    ],
                    exports: [
                        BsAlertComponent,
                        BsAlertCloseComponent
                    ]
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { BsAlertCloseComponent, BsAlertComponent, BsAlertModule };
//# sourceMappingURL=mintplayer-ng-bootstrap-alert.mjs.map
