var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
import * as classnames from "classnames";
import * as React from "react";
import "./Badge.less";
export var cssClass = {
    CONTAINER: "Badge",
    EMPTY: "Badge--empty",
    SUPER: "Badge--super",
    color: function (c) { return "Badge--" + c; },
    size: function (s) { return "Badge--" + s; },
};
var Size = {
    S: "s",
    M: "m",
    L: "l",
};
var Color = {
    RED: "red",
    BLUE: "blue",
    GRAY: "gray",
};
var defaultProps = {
    color: Color.BLUE,
    size: Size.M,
};
var Badge = /** @class */ (function (_super) {
    __extends(Badge, _super);
    function Badge() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Badge.prototype.render = function () {
        var _a = this.props, color = _a.color, children = _a.children, className = _a.className, size = _a.size, superscript = _a.superscript;
        var classes = classnames(cssClass.CONTAINER, children === undefined && cssClass.EMPTY, color && cssClass.color(color), size && cssClass.size(size), superscript && cssClass.SUPER, className);
        return React.createElement("span", { className: classes }, children);
    };
    Badge.defaultProps = defaultProps;
    Badge.Color = Color;
    Badge.Size = Size;
    return Badge;
}(React.PureComponent));
export { Badge };
