'use strict';

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

var vue = require('vue');
require('../../../utils/index.cjs');
var useConfigInject = require('../../config-provider/src/hooks/useConfigInject.cjs');
var index = require('../style/index.cjs');
var props = require('./props.cjs');
var _class = require('../../../utils/dom/class.cjs');

const Typography = /* @__PURE__ */ vue.defineComponent({
  name: "ATypography",
  inheritAttrs: false,
  props: 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, {
        ...restProps,
        "class": _class.classNames(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;
//# sourceMappingURL=Typography.cjs.map
