import { _ as _extends } from '../extends-e61fd370.js';
import { _ as _objectWithoutProperties } from '../objectWithoutProperties-72d23964.js';
import React__default from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';

var _excluded = ["children", "color", "variant", "size"];
var DEFAULT = "font-semibold border rounded-full px-2 py-px inline-block";
var COLORS = {
  gray: {
    solid: "bg-gray-800 border-gray-800 text-white",
    outline: "bg-transparent border-gray-800 text-gray-800",
    light: "bg-gray-50 border-gray-50 text-gray-800"
  },
  green: {
    solid: "bg-green-500 border-green-500 text-white",
    outline: "bg-transparent border-green-600 text-green-600",
    light: "bg-green-50 border-green-50 text-green-600"
  },
  red: {
    solid: "bg-red-500 border-red-500 text-white",
    outline: "bg-transparent border-red-600 text-red-600",
    light: "bg-red-50 border-red-50 text-red-600"
  },
  blue: {
    solid: "bg-blue-500 border-blue-500 text-white",
    outline: "bg-transparent border-blue-600 text-blue-600",
    light: "bg-blue-50 border-blue-50 text-blue-600"
  },
  yellow: {
    solid: "bg-yellow-500 border-yellow-500 text-white",
    outline: "bg-transparent border-yellow-600 text-yellow-600",
    light: "bg-yellow-50 border-yellow-50 text-yellow-600"
  }
};
var SIZES = {
  sm: 'text-xs leading-4',
  lg: 'text-sm leading-5'
};

var Badge = function Badge(_ref) {
  var children = _ref.children,
      _ref$color = _ref.color,
      color = _ref$color === void 0 ? "gray" : _ref$color,
      _ref$variant = _ref.variant,
      variant = _ref$variant === void 0 ? "solid" : _ref$variant,
      _ref$size = _ref.size,
      size = _ref$size === void 0 ? "sm" : _ref$size,
      props = _objectWithoutProperties(_ref, _excluded);

  var className = cx(props.className, DEFAULT, COLORS[color][variant], SIZES[size]);
  return /*#__PURE__*/React__default.createElement("span", _extends({}, props, {
    className: className
  }), children);
};

Badge.propTypes = {
  children: PropTypes.node.isRequired,
  className: PropTypes.string,
  color: PropTypes.oneOf(Object.keys(COLORS)),
  size: PropTypes.oneOf(["sm", "lg"]),
  variant: PropTypes.oneOf(["solid", "outline", "light"])
};

export { COLORS, Badge as default };
