import { Component, Input } from '@angular/core';
import { BehaviorSubject, map } from 'rxjs';
import { Color } from '@mintplayer/ng-bootstrap';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
export 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.0.4", ngImport: i0, type: BsBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
BsBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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.0.4", 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
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFkZ2UuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9taW50cGxheWVyLW5nLWJvb3RzdHJhcC9iYWRnZS9zcmMvYmFkZ2UuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9taW50cGxheWVyLW5nLWJvb3RzdHJhcC9iYWRnZS9zcmMvYmFkZ2UuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBZSxLQUFLLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFDdEUsT0FBTyxFQUFFLGVBQWUsRUFBRSxHQUFHLEVBQWMsTUFBTSxNQUFNLENBQUM7QUFDeEQsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLDBCQUEwQixDQUFDOzs7QUFPakQsTUFBTSxPQUFPLGdCQUFnQjtJQUMzQjtRQUtBLFdBQU0sR0FBRyxLQUFLLENBQUM7UUFFZixjQUFjO1FBQ2QsVUFBSyxHQUFHLElBQUksZUFBZSxDQUFRLEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQztRQVBoRCxJQUFJLENBQUMsV0FBVyxHQUFHLElBQUksQ0F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