'use strict';

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

var vue = require('vue');
var index = require('../_util/props-util/index.js');
require('../hooks/index.js');
var type = require('../_util/type.js');
var useConfigInject = require('../config-provider/hooks/useConfigInject.js');

const cardMetaProps = () => ({
  prefixCls: String,
  title: type.vNodeType(),
  description: type.vNodeType(),
  avatar: type.vNodeType()
});
var Meta = /* @__PURE__ */ vue.defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "ACardMeta",
  props: cardMetaProps(),
  slots: Object,
  setup(props, {
    slots
  }) {
    const {
      prefixCls
    } = useConfigInject.default("card", props);
    return () => {
      const classString = {
        [`${prefixCls.value}-meta`]: true
      };
      const avatar = index.getPropsSlot(slots, props, "avatar");
      const title = index.getPropsSlot(slots, props, "title");
      const description = index.getPropsSlot(slots, props, "description");
      const avatarDom = avatar ? vue.createVNode("div", {
        "class": `${prefixCls.value}-meta-avatar`
      }, [avatar]) : null;
      const titleDom = title ? vue.createVNode("div", {
        "class": `${prefixCls.value}-meta-title`
      }, [title]) : null;
      const descriptionDom = description ? vue.createVNode("div", {
        "class": `${prefixCls.value}-meta-description`
      }, [description]) : null;
      const MetaDetail = titleDom || descriptionDom ? vue.createVNode("div", {
        "class": `${prefixCls.value}-meta-detail`
      }, [titleDom, descriptionDom]) : null;
      return vue.createVNode("div", {
        "class": classString
      }, [avatarDom, MetaDetail]);
    };
  }
});

exports.cardMetaProps = cardMetaProps;
exports.default = Meta;
//# sourceMappingURL=Meta.js.map
