import { defineComponent, createVNode, mergeProps } from 'vue';
import '../hooks/index.mjs';
import classNames from '../_util/classNames.mjs';
import useStyle from './style/index.mjs';
import useConfigInject from '../config-provider/hooks/useConfigInject.mjs';

const typographyProps = () => ({
  prefixCls: String,
  direction: String,
  // Form Internal use
  component: String
});
const Typography = /* @__PURE__ */ defineComponent({
  name: "ATypography",
  inheritAttrs: false,
  props: typographyProps(),
  setup(props, {
    slots,
    attrs
  }) {
    const {
      prefixCls,
      direction
    } = useConfigInject("typography", props);
    const [wrapSSR, hashId] = useStyle(prefixCls);
    return () => {
      const {
        prefixCls: _prefixCls,
        direction: _direction,
        component: Component = "article",
        ...restProps
      } = {
        ...props,
        ...attrs
      };
      return wrapSSR(createVNode(Component, mergeProps(restProps, {
        "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)];
        }
      }));
    };
  }
});

export { Typography as default, typographyProps };
//# sourceMappingURL=Typography.mjs.map
