import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["prefixCls", "component", "className", "aria-label", "setContentRef", "children"];
import React from 'react';
import classNames from 'classnames';
import { composeRef } from "rc-util/es/ref";
import warning from '../../../es/_util/warning';
import ConfigContext from '../../../es/config-provider/ConfigContext';
var Typography = /*#__PURE__*/React.forwardRef(function (props, ref) {
  var customizePrefixCls = props.prefixCls,
      component = props.component,
      className = props.className,
      ariaLabel = props['aria-label'],
      setContentRef = props.setContentRef,
      children = props.children,
      restProps = _objectWithoutProperties(props, _excluded);

  var _React$useContext = React.useContext(ConfigContext),
      getProPrefixCls = _React$useContext.getProPrefixCls;

  var mergedRef = ref;

  if (setContentRef) {
    warning(false, "[c7n: Typography] setContentRef is deprecated. Please use ref instead.");
    mergedRef = composeRef(ref, setContentRef);
  }

  var Component = component;
  var prefixCls = getProPrefixCls('typography', customizePrefixCls);
  var componentClassName = classNames(prefixCls, className);
  return /*#__PURE__*/React.createElement(Component, _extends({
    className: componentClassName,
    "aria-label": ariaLabel,
    ref: mergedRef
  }, restProps), children);
});
Typography.__PRO_TYPOGRAPHY = true;
Typography.displayName = 'Typography';
Typography.defaultProps = {
  component: 'article'
};
export default Typography;
//# sourceMappingURL=Typography.js.map
