import React__default from 'react';
import PropTypes from 'prop-types';
import Text from '../text/index.js';
import '../extends-C4cduGrv.js';
import '../defineProperty-CEd-kZQW.js';
import '../objectWithoutProperties-TXwlfNxG.js';
import 'classnames';

var HEADINGS = {
  1: {
    size: "2xl"
  },
  2: {
    size: "xl"
  },
  3: {
    size: "lg"
  },
  4: {
    size: "md"
  },
  5: {
    size: "sm"
  },
  6: {
    size: "sm"
  }
};
function Heading(_ref) {
  var level = _ref.level,
      as = _ref.as,
      children = _ref.children,
      className = _ref.className,
      color = _ref.color;
  as = as || "h".concat(level);
  return /*#__PURE__*/React__default.createElement(Text, {
    as: as,
    size: HEADINGS[level].size,
    weight: "semibold",
    className: className,
    color: color
  }, children);
}
Heading.propTypes = {
  /** Changes the underlying tag while retaining the styles from the given `level`. */
  as: PropTypes.oneOf(["h1", "h2", "h3", "h4", "h5", "h6"]),
  level: PropTypes.oneOf([1, 2, 3, 4, 5, 6]),

  /** A Tailwind-style text color such as `red-400`. */
  color: PropTypes.string,
  className: PropTypes.string,
  children: PropTypes.node
};

export { Heading as default };
