'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
require('../hooks/index.js');
var classNames = require('../_util/classNames.js');
var index = require('./style/index.js');
var useConfigInject = require('../config-provider/hooks/useConfigInject.js');

const typographyProps = () => ({
  prefixCls: String,
  direction: String,
  // Form Internal use
  component: String
});
const Typography = /* @__PURE__ */ vue.defineComponent({
  name: "ATypography",
  inheritAttrs: false,
  props: typographyProps(),
  setup(props, {
    slots,
    attrs
  }) {
    const {
      prefixCls,
      direction
    } = useConfigInject.default("typography", props);
    const [wrapSSR, hashId] = index.default(prefixCls);
    return () => {
      const {
        prefixCls: _prefixCls,
        direction: _direction,
        component: Component = "article",
        ...restProps
      } = {
        ...props,
        ...attrs
      };
      return wrapSSR(vue.createVNode(Component, vue.mergeProps(restProps, {
        "class": classNames.default(prefixCls.value, {
          [`${prefixCls.value}-rtl`]: direction.value === "rtl"
        }, attrs.class, hashId.value)
      }), {
        default: () => {
          var _a;
          return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
        }
      }));
    };
  }
});

exports.default = Typography;
exports.typographyProps = typographyProps;
//# sourceMappingURL=Typography.js.map
