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

'use strict';

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

var vue = require('vue');
var isString = require('lodash/isString');
var hooks_useConfig = require('../hooks/useConfig.js');
var hooks_tnode = require('../hooks/tnode.js');
var list_listItemMetaProps = require('./list-item-meta-props.js');
require('../config-provider/useConfig.js');
require('lodash/cloneDeep');
require('lodash/isFunction');
require('../config-provider/context.js');
require('lodash/mergeWith');
require('lodash/merge');
require('lodash/isArray');
require('../_common/js/global-config/default-config.js');
require('../_common/js/global-config/locale/zh_CN.js');
require('@babel/runtime/helpers/typeof');
require('../_chunks/dep-f4db2590.js');
require('dayjs');
require('lodash/camelCase');
require('lodash/kebabCase');
require('../utils/render-tnode.js');
require('lodash/isEmpty');
require('lodash/isObject');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var isString__default = /*#__PURE__*/_interopDefaultLegacy(isString);

var _ListItemMeta = vue.defineComponent({
  name: "TListItemMeta",
  props: list_listItemMetaProps["default"],
  setup: function setup(props2, ctx) {
    var COMPONENT_NAME = hooks_useConfig.usePrefixClass("list-item__meta");
    var renderContent = hooks_tnode.useContent();
    var renderTNodeJSX = hooks_tnode.useTNodeJSX();
    var renderAvatar = function renderAvatar() {
      if (props2.avatar || ctx.slots.avatar) console.warn("`avatar` is going to be deprecated, please use `image` instead");
      var thumbnail = renderContent("avatar", "image");
      if (!thumbnail) return;
      if (isString__default["default"](thumbnail)) {
        return vue.createVNode("div", {
          "class": "".concat(COMPONENT_NAME.value, "-avatar")
        }, [vue.createVNode("img", {
          "src": thumbnail
        }, null)]);
      }
      return vue.createVNode("div", {
        "class": "".concat(COMPONENT_NAME.value, "-avatar")
      }, [thumbnail]);
    };
    return function () {
      var propsTitleContent = renderTNodeJSX("title");
      var propsDescriptionContent = renderTNodeJSX("description");
      var listItemMetaContent = [renderAvatar(), vue.createVNode("div", {
        "class": "".concat(COMPONENT_NAME.value, "-content")
      }, [propsTitleContent && vue.createVNode("h3", {
        "class": "".concat(COMPONENT_NAME.value, "-title")
      }, [propsTitleContent]), propsDescriptionContent && vue.createVNode("p", {
        "class": "".concat(COMPONENT_NAME.value, "-description")
      }, [propsDescriptionContent])])];
      return vue.createVNode("div", {
        "class": COMPONENT_NAME.value
      }, [listItemMetaContent]);
    };
  }
});

exports["default"] = _ListItemMeta;
//# sourceMappingURL=list-item-meta.js.map
