/**
 * ldesign v0.4.6
 * (c) 2023 ldesign
 * @license MIT
 */

import { renderContent, renderTNodeJSX } from '../utils/render-tnode.js';
import { getClassPrefixMixins } from '../config-provider/config-receiver.js';
import mixins from '../utils/mixins.js';
import props from './list-item-meta-props.js';
import '@babel/runtime/helpers/defineProperty';
import '@babel/runtime/helpers/typeof';
import 'vue';
import '@vue/composition-api';
import 'lodash/camelCase';
import 'lodash/kebabCase';
import 'lodash/mergeWith';
import '../config-provider/context.js';
import 'lodash/merge';
import '../_common/js/global-config/default-config.js';
import '../_common/js/global-config/locale/zh_CN.js';
import '../_chunks/dep-2cb61c79.js';
import 'dayjs';

var classPrefixMixins = getClassPrefixMixins("list-item__meta");
var _ListItemMeta = mixins(classPrefixMixins).extend({
  name: "TListItemMeta",
  props: props,
  methods: {
    renderAvatar: function renderAvatar() {
      var h = this.$createElement;
      if (this.avatar || this.$scopedSlots.avatar) console.warn("`avatar` is going to be deprecated, please use `image` instead");
      var thumbnail = renderContent(this, "avatar", "image");
      if (!thumbnail) return;
      if (typeof thumbnail === "string") {
        return h("div", {
          "class": "".concat(this.componentName, "-avatar")
        }, [h("img", {
          "attrs": {
            "src": thumbnail
          }
        })]);
      }
      return h("div", {
        "class": "".concat(this.componentName, "-avatar")
      }, [thumbnail]);
    }
  },
  render: function render() {
    var h = arguments[0];
    var propsTitleContent = renderTNodeJSX(this, "title");
    var propsDescriptionContent = renderTNodeJSX(this, "description");
    var listItemMetaContent = [this.renderAvatar(), h("div", {
      "class": "".concat(this.componentName, "-content")
    }, [propsTitleContent && h("h3", {
      "class": "".concat(this.componentName, "-title")
    }, [propsTitleContent]), propsDescriptionContent && h("p", {
      "class": "".concat(this.componentName, "-description")
    }, [propsDescriptionContent])])];
    return h("div", {
      "class": this.componentName
    }, [listItemMetaContent]);
  }
});

export { _ListItemMeta as default };
//# sourceMappingURL=list-item-meta.js.map
