import { defineComponent, useAttrs, computed, resolveComponent, createBlock, openBlock, mergeProps, unref, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
import '../../../utils/index.mjs';
import { textParagraphProps } from './text.mjs';
import { createNamespace } from '../../../utils/create-namespace.mjs';

"use strict";
var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{ name: "LlTextParagraph" },
  __name: "text-paragraph",
  props: textParagraphProps,
  setup(__props) {
    const props = __props;
    const attrs = useAttrs();
    const bem = createNamespace("text-paragraph");
    const ellipsis = computed(() => {
      if (attrs.ellipsis) {
        return attrs.ellipsis;
      } else {
        return props.isEllipsis ? {
          rows: props.rows,
          tooltip: props.showTooltip,
          expandable: props.expandable,
          symbol: props.symbol || "more"
        } : false;
      }
    });
    return (_ctx, _cache) => {
      const _component_a_typography_paragraph = resolveComponent("a-typography-paragraph");
      return openBlock(), createBlock(_component_a_typography_paragraph, mergeProps(unref(attrs), {
        class: unref(bem).b(),
        ellipsis: ellipsis.value
      }), createSlots({
        _: 2
        /* DYNAMIC */
      }, [
        renderList(Object.keys(_ctx.$slots), (item) => {
          return {
            name: item,
            fn: withCtx((data) => [
              renderSlot(_ctx.$slots, item, normalizeProps(guardReactiveProps(data || {})))
            ])
          };
        })
      ]), 1040, ["class", "ellipsis"]);
    };
  }
});

export { _sfc_main as default };
//# sourceMappingURL=text-paragraph.vue2.mjs.map
