import * as i0 from '@angular/core';
import { Component, Input, NgModule } from '@angular/core';
import { BehaviorSubject, map } from 'rxjs';
import { Color } from '@mintplayer/ng-bootstrap';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';

class BsBadgeComponent {
    constructor() {
        this.colors = Color;
        //#region Type
        this.type$ = new BehaviorSubject(Color.primary);
        this.colorClass$ = this.type$
            .pipe(map((type) => `bg-${this.colors[type]}`));
    }
    get type() {
        return this.type$.value;
    }
    set type(value) {
        this.type$.next(value);
    }
    ngOnInit() { }
}
BsBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BsBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
BsBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: BsBadgeComponent, selector: "bs-badge", inputs: { type: "type" }, ngImport: i0, template: "<span class=\"badge\" [class]=\"colorClass$ | async\">\n    <ng-content></ng-content>\n</span>", styles: [":host ::ng-deep .badge{--bs-badge-padding-x: .65em;--bs-badge-padding-y: .35em;--bs-badge-font-size: .75em;--bs-badge-font-weight: 700;--bs-badge-color: #fff;--bs-badge-border-radius: .375rem;display:inline-block;padding:var(--bs-badge-padding-y) var(--bs-badge-padding-x);font-size:var(--bs-badge-font-size);font-weight:var(--bs-badge-font-weight);line-height:1;color:var(--bs-badge-color);text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--bs-badge-border-radius)}:host ::ng-deep .badge:empty{display:none}:host ::ng-deep .btn .badge{position:relative;top:-1px}\n"], dependencies: [{ kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BsBadgeComponent, decorators: [{
            type: Component,
            args: [{ selector: 'bs-badge', template: "<span class=\"badge\" [class]=\"colorClass$ | async\">\n    <ng-content></ng-content>\n</span>", styles: [":host ::ng-deep .badge{--bs-badge-padding-x: .65em;--bs-badge-padding-y: .35em;--bs-badge-font-size: .75em;--bs-badge-font-weight: 700;--bs-badge-color: #fff;--bs-badge-border-radius: .375rem;display:inline-block;padding:var(--bs-badge-padding-y) var(--bs-badge-padding-x);font-size:var(--bs-badge-font-size);font-weight:var(--bs-badge-font-weight);line-height:1;color:var(--bs-badge-color);text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--bs-badge-border-radius)}:host ::ng-deep .badge:empty{display:none}:host ::ng-deep .btn .badge{position:relative;top:-1px}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { type: [{
                type: Input
            }] } });

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

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

export { BsBadgeComponent, BsBadgeModule };
//# sourceMappingURL=mintplayer-ng-bootstrap-badge.mjs.map
