(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/icon'), require('@angular/material/tooltip')) :
    typeof define === 'function' && define.amd ? define('@sd-angular/core/badge', ['exports', '@angular/core', '@angular/common', '@angular/material/icon', '@angular/material/tooltip'], factory) :
    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sd-angular'] = global['sd-angular'] || {}, global['sd-angular'].core = global['sd-angular'].core || {}, global['sd-angular'].core.badge = {}), global.ng.core, global.ng.common, global.ng.material.icon, global.ng.material.tooltip));
}(this, (function (exports, core, common, icon, tooltip) { 'use strict';

    var SdBadge = /** @class */ (function () {
        function SdBadge() {
            var _this = this;
            this.color = 'unknown';
            this.type = 'circle';
            this.icon = 'fiber_manual_record';
            this.size = 'sm';
            this.sdClick = new core.EventEmitter();
            this.onClick = function (event) {
                _this.sdClick.observers.length;
                _this.sdClick.emit(event);
            };
        }
        Object.defineProperty(SdBadge.prototype, "_color", {
            set: function (color) {
                if (!color || !['normal', 'primary', 'info', 'success', 'warning', 'danger'].includes(color)) {
                    this.color = 'unknown';
                }
                else {
                    this.color = color;
                }
            },
            enumerable: false,
            configurable: true
        });
        ;
        Object.defineProperty(SdBadge.prototype, "_icon", {
            set: function (val) {
                this.icon = val || 'fiber_manual_record';
            },
            enumerable: false,
            configurable: true
        });
        ;
        return SdBadge;
    }());
    SdBadge.decorators = [
        { type: core.Component, args: [{
                    selector: 'sd-badge',
                    template: "<div *ngIf=\"type === 'round'\" class=\"c-badge\" matTooltipPosition=\"above\" [matTooltip]=\"tooltip\"\r\n  [ngClass]=\"{'c-black400': color === 'normal', 'c-info': color === 'info', 'c-success': color === 'success', 'c-danger': color === 'danger', 'c-warning': color === 'warning'}\"\r\n  [class.pointer]=\"!!sdClick.observers?.length\" (click)=\"onClick($event)\">\r\n  {{ title }}\r\n</div>\r\n<div *ngIf=\"type === 'circle' || type === 'icon'\" class=\"d-flex\" matTooltipPosition=\"above\" [matTooltip]=\"tooltip\"\r\n  [ngClass]=\"{'c-badge-circle': type === 'circle','c-badge-icon': type === 'icon', 'c-unknown': color === 'unknown', 'c-primary': color === 'primary', 'c-black400': color === 'normal', 'c-info': color === 'info', 'c-success': color === 'success', 'c-danger': color === 'danger', 'c-warning': color === 'warning'}\"\r\n  [class.pointer]=\"!!sdClick.observers?.length\" (click)=\"onClick($event)\">\r\n  <div class=\"d-flex align-items-center\">\r\n    <span class=\"c-material-icon mr-4\" [ngClass]=\"{\r\n      'material-icons-outlined': color === 'unknown',\r\n      'material-icons-round': color !== 'unknown',\r\n      'c-xs': size === 'xs',\r\n      'c-sm': size === 'sm',\r\n      'c-md': size === 'md',\r\n      'c-lg': size === 'lg', \r\n      'c-unknown': color === 'unknown', \r\n      'c-primary': color === 'primary', \r\n      'c-black400': color === 'normal', \r\n      'c-info': color === 'info', \r\n      'c-success': color === 'success', \r\n      'c-danger': color === 'danger', \r\n      'c-warning': color === 'warning'\r\n    }\">\r\n      {{ icon }}\r\n    </span>\r\n    <div class=\"d-flex flex-column\">\r\n      <span class=\"T14R\">{{ title }}</span>\r\n      <span *ngIf=\"description\" class=\"T12R c-badge-description\">{{ description }}</span>\r\n    </div>\r\n  </div>\r\n</div>",
                    changeDetection: core.ChangeDetectionStrategy.OnPush,
                    styles: [".text-black400{color:#757575}.c-badge{border-radius:20px;display:inline-block;margin-bottom:4px;min-width:150px;overflow-wrap:break-word;padding:2px 12px;text-align:center}.c-badge.c-primary{background:#e7e9ff;color:#2962ff}.c-badge.c-black400{background:#e9e9e9;color:#757575}.c-badge.c-info{background:#e7e9ff;color:#2962ff}.c-badge.c-warning{background:#ffeacc;color:#ff9600}.c-badge.c-success{background:#dbefdc;color:#4caf50}.c-badge.c-danger{background:#fed5d0;color:#f82c13}.c-badge-circle{min-width:150px}.c-badge-circle .c-material-icon{font-size:16px;height:16px;width:16px}.c-badge-circle .c-material-icon.c-badge-icon{font-size:12px;height:12px;width:12px}.c-badge-circle.c-unknown{color:rgba(0,0,0,.5)}.c-badge-circle.c-primary{color:#2962ff}.c-badge-circle.c-black400{color:#757575}.c-badge-circle.c-info{color:#2962ff}.c-badge-circle.c-success{color:#4caf50}.c-badge-circle.c-danger{color:#f82c13}.c-badge-circle.c-warning{color:#ff9600}.c-badge-icon{min-width:50px}.c-badge-icon .c-material-icon{border-radius:50%;padding:2px}.c-badge-icon .c-material-icon.c-xs{font-size:14px;height:18px;width:18px}.c-badge-icon .c-material-icon.c-sm{font-size:16px;height:20px;width:20px}.c-badge-icon .c-material-icon.c-md{font-size:18px;height:22px;width:22px}.c-badge-icon .c-material-icon.c-lg{font-size:24px;height:28px;width:28px}.c-badge-icon .c-material-icon.c-unknown{color:rgba(0,0,0,.5)}.c-badge-icon .c-material-icon.c-primary{color:#2962ff}.c-badge-icon .c-material-icon.c-black400{color:#757575}.c-badge-icon .c-material-icon.c-info{color:#2962ff}.c-badge-icon .c-material-icon.c-success{color:#4caf50}.c-badge-icon .c-material-icon.c-danger{color:#f82c13}.c-badge-icon .c-material-icon.c-warning{color:#ff9600}.c-badge-description{color:rgba(0,0,0,.5)}"]
                },] }
    ];
    SdBadge.propDecorators = {
        type: [{ type: core.Input }],
        _color: [{ type: core.Input, args: ['color',] }],
        title: [{ type: core.Input }],
        description: [{ type: core.Input }],
        tooltip: [{ type: core.Input }],
        _icon: [{ type: core.Input, args: ['icon',] }],
        size: [{ type: core.Input }],
        sdClick: [{ type: core.Output }]
    };

    var SdBadgeModule = /** @class */ (function () {
        function SdBadgeModule() {
        }
        return SdBadgeModule;
    }());
    SdBadgeModule.decorators = [
        { type: core.NgModule, args: [{
                    imports: [common.CommonModule, icon.MatIconModule, tooltip.MatTooltipModule],
                    declarations: [SdBadge],
                    exports: [SdBadge],
                },] }
    ];

    /*
     * Public API Surface of superdev-angular-core
     */

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

    exports.SdBadge = SdBadge;
    exports.SdBadgeModule = SdBadgeModule;

    Object.defineProperty(exports, '__esModule', { value: true });

})));
//# sourceMappingURL=sd-angular-core-badge.umd.js.map
