import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["className", "label", "icon", "color", "italic"];
import React from "react";
import PropTypes from "prop-types";
import classnames from "classnames";
import Typography from "../Typography";
import CssFlex from "../CssFlex";
import getClasses from "./styles";
var Tag = /*#__PURE__*/React.forwardRef(function (props, ref) {
  var className = props.className,
      label = props.label,
      icon = props.icon,
      color = props.color,
      italic = props.italic,
      tagProps = _objectWithoutProperties(props, _excluded);

  var classes = getClasses({
    color: color
  });
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CssFlex, _extends({
    gap: "sm",
    alignItems: "center",
    className: classnames(className, classes.root)
  }, tagProps), icon, /*#__PURE__*/React.createElement(Typography, {
    color: color,
    shade: 700,
    variant: "small".concat(italic ? "Italic" : "")
  }, label)));
}); // @ts-ignore

Tag.propTypes = {
  label: PropTypes.string,
  color: PropTypes.string,
  className: PropTypes.string,
  italic: PropTypes.bool
}; // @ts-ignore

Tag.defaultProps = {
  color: "blue"
};
export default Tag;