import { CommonModule } from '@angular/common';
import { NgModule, Component, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, Input } from '@angular/core';
import { BaseDirective } from '../../../base.directive';
import * as i0 from "@angular/core";
const _c0 = ["euiBadge", ""];
const _c1 = ["*"];
export class EuiBadgeComponent extends BaseDirective {
    constructor() {
        super();
        this._ariaLabel = 'eUI Badge';
    }
    get cssClasses() {
        return this.getCssClasses();
    }
    get ariaLabel() {
        return this._ariaLabel;
    }
    set ariaLabel(value) {
        this._ariaLabel = value;
    }
    getCssClasses() {
        return [
            super.getCssClasses('eui-badge'),
        ].join(' ').trim();
    }
}
/** @nocollapse */ EuiBadgeComponent.ɵfac = function EuiBadgeComponent_Factory(t) { return new (t || EuiBadgeComponent)(); };
/** @nocollapse */ EuiBadgeComponent.ɵcmp = i0.ɵɵdefineComponent({ type: EuiBadgeComponent, selectors: [["span", "euiBadge", ""], ["eui-badge"]], hostVars: 3, hostBindings: function EuiBadgeComponent_HostBindings(rf, ctx) { if (rf & 2) {
        i0.ɵɵattribute("aria-label", ctx.ariaLabel);
        i0.ɵɵclassMap(ctx.cssClasses);
    } }, inputs: { ariaLabel: ["aria-label", "ariaLabel"] }, features: [i0.ɵɵInheritDefinitionFeature], attrs: _c0, ngContentSelectors: _c1, decls: 1, vars: 0, template: function EuiBadgeComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵprojectionDef();
        i0.ɵɵprojection(0);
    } }, styles: [".eui-badge{align-items:center;background-color:var(--eui-color-primary);border:1px solid hsla(0,0%,100%,.8);border-radius:5rem;color:var(--eui-color-white);display:inline-flex;font-size:var(--eui-font-size-s);font-style:normal;font-weight:400;justify-content:center;overflow:hidden;padding:var(--eui-spacing-2xs) var(--eui-spacing-xs) var(--eui-spacing-2xs) var(--eui-spacing-xs);pointer-events:none;text-align:center;text-overflow:ellipsis;white-space:nowrap}.eui-icon .eui-badge{font-size:var(--eui-font-size-xs);position:absolute;right:-50%;top:-50%;transition:all .3s ease}.eui-button .eui-badge{height:inherit;position:relative;transition:all .3s ease}.eui-badge--rounded{border-radius:var(--eui-spacing-m)}.eui-badge--primary{background-color:var(--eui-color-primary);color:var(--eui-color-white)}.eui-badge--secondary{background-color:var(--eui-color-grey-dark);color:var(--eui-color-white)}.eui-badge--info{background-color:var(--eui-color-info);color:var(--eui-color-white)}.eui-badge--success{background-color:var(--eui-color-success);color:var(--eui-color-white)}.eui-badge--warning{background-color:var(--eui-color-warning);color:var(--eui-color-black)}.eui-badge--danger{background-color:var(--eui-color-danger);color:var(--eui-color-white)}.eui-badge--accent{background-color:var(--eui-color-accent);color:var(--eui-color)}.eui-badge--size-xs{padding:var(--eui-spacing-3xs) var(--eui-spacing-xs)}.eui-badge--size-s{transform:scale(.8)}.eui-badge--size-m{transform:scale(1)}.eui-badge--size-l{transform:scale(1.2)}.eui-badge--size-xl{transform:scale(1.4)}.eui-badge--size-2xl{transform:scale(1.6)}"], encapsulation: 2, changeDetection: 0 });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(EuiBadgeComponent, [{
        type: Component,
        args: [{
                selector: 'span[euiBadge], eui-badge',
                template: '<ng-content></ng-content>',
                styleUrls: ['./styles/_index.scss'],
                changeDetection: ChangeDetectionStrategy.OnPush,
                encapsulation: ViewEncapsulation.None,
            }]
    }], function () { return []; }, { cssClasses: [{
            type: HostBinding,
            args: ['class']
        }], ariaLabel: [{
            type: HostBinding,
            args: ['attr.aria-label']
        }, {
            type: Input,
            args: ['aria-label']
        }] }); })();
export class EuiBadgeModule {
}
/** @nocollapse */ EuiBadgeModule.ɵmod = i0.ɵɵdefineNgModule({ type: EuiBadgeModule });
/** @nocollapse */ EuiBadgeModule.ɵinj = i0.ɵɵdefineInjector({ factory: function EuiBadgeModule_Factory(t) { return new (t || EuiBadgeModule)(); }, imports: [[CommonModule]] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(EuiBadgeModule, { declarations: [EuiBadgeComponent], imports: [CommonModule], exports: [EuiBadgeComponent] }); })();
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(EuiBadgeModule, [{
        type: NgModule,
        args: [{
                imports: [CommonModule],
                exports: [EuiBadgeComponent],
                declarations: [EuiBadgeComponent],
            }]
    }], null, null); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXVpLWJhZGdlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIvYnVpbGRzL2V1aS9jYy1jc2RyLXJvb3QvcGFja2FnZXMvZXVpL3BhY2thZ2VzL2NvbXBvbmVudHMtbmV4dC9zcmMvIiwic291cmNlcyI6WyJsaWIvY29tcG9uZW50cy9hdG9tcy9ldWktYmFkZ2UvZXVpLWJhZGdlLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxTQUFTLEVBQUUsV0FBVyxFQUFFLHVCQUF1QixFQUFFLGlCQUFpQixFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNwSCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0seUJBQXlCLENBQUM7Ozs7QUFTeEQsTUFBTSxPQUFPLGlCQUFrQixTQUFRLGFBQWE7SUFnQmhEO1FBQ0ksS0FBSyxFQUFFLENBQUM7UUFIRixlQUFVLEdBQUcsV0FBVyxDQUFDO0lBSW5DLENBQUM7SUFqQkQsSUFDVyxVQUFVO1FBQ2pCLE9BQU8sSUFBSSxDQUFDLGFBQWEsRUFBRSxDQUFDO0lBQ2hDLENBQUM7SUFDRCxJQUVXLFNBQVM7UUFDaEIsT0FBTyxJQUFJLENBQUMsVUFBVSxDQUFDO0lBQzNCLENBQUM7SUFDRCxJQUFXLFNBQVMsQ0FBQyxLQUFrQjtRQUNuQyxJQUFJLENBQUMsVUFBVSxHQUFHLEtB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