import { defineComponent, createVNode } from 'vue';
import useConfigInject from '../../config-provider/src/hooks/useConfigInject.mjs';
import { listItemMetaProps } from './props.mjs';

var AListItemMeta = /* @__PURE__ */ defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "AListItemMeta",
  props: listItemMetaProps(),
  displayName: "AListItemMeta",
  // 兼容历史函数式组件
  __ANT_LIST_ITEM_META: true,
  slots: Object,
  setup(props, {
    slots
  }) {
    const {
      prefixCls
    } = useConfigInject("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 = createVNode("div", {
        "class": `${prefixCls.value}-item-meta-content`
      }, [title && createVNode("h4", {
        "class": `${prefixCls.value}-item-meta-title`
      }, [title]), description && createVNode("div", {
        "class": `${prefixCls.value}-item-meta-description`
      }, [description])]);
      return createVNode("div", {
        "class": classString
      }, [avatar && createVNode("div", {
        "class": `${prefixCls.value}-item-meta-avatar`
      }, [avatar]), (title || description) && content]);
    };
  }
});

export { AListItemMeta as default };
//# sourceMappingURL=ItemMeta.mjs.map
