'use strict';

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

var vue = require('vue');
var useConfigInject = require('../../config-provider/src/hooks/useConfigInject.cjs');
var props = require('./props.cjs');

var AListItemMeta = /* @__PURE__ */ vue.defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "AListItemMeta",
  props: props.listItemMetaProps(),
  displayName: "AListItemMeta",
  // 兼容历史函数式组件
  __ANT_LIST_ITEM_META: true,
  slots: Object,
  setup(props, {
    slots
  }) {
    const {
      prefixCls
    } = useConfigInject.default("list", props);
    return () => {
      var _a, _b, _c, _d, _e, _f;
      const classString = `${prefixCls.value}-item-meta`;
      const title = (_b = props.title) != null ? _b : (_a = slots.title) == null ? void 0 : _a.call(slots);
      const description = (_d = props.description) != null ? _d : (_c = slots.description) == null ? void 0 : _c.call(slots);
      const avatar = (_f = props.avatar) != null ? _f : (_e = slots.avatar) == null ? void 0 : _e.call(slots);
      const content = vue.createVNode("div", {
        "class": `${prefixCls.value}-item-meta-content`
      }, [title && vue.createVNode("h4", {
        "class": `${prefixCls.value}-item-meta-title`
      }, [title]), description && vue.createVNode("div", {
        "class": `${prefixCls.value}-item-meta-description`
      }, [description])]);
      return vue.createVNode("div", {
        "class": classString
      }, [avatar && vue.createVNode("div", {
        "class": `${prefixCls.value}-item-meta-avatar`
      }, [avatar]), (title || description) && content]);
    };
  }
});

exports.default = AListItemMeta;
//# sourceMappingURL=ItemMeta.cjs.map
