import { defineComponent, createVNode } from 'vue';
import { skeletonParagraphProps } from './props.mjs';

var Paragraph = /* @__PURE__ */ defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "SkeletonParagraph",
  props: skeletonParagraphProps(),
  setup(props) {
    const getWidth = (index) => {
      const {
        width,
        rows = 2
      } = props;
      if (Array.isArray(width))
        return width[index];
      if (rows - 1 === index)
        return width;
      return void 0;
    };
    return () => {
      const {
        prefixCls,
        rows
      } = props;
      const rowList = [...Array(rows)].map((_, index) => {
        const width = getWidth(index);
        return createVNode("li", {
          "key": index,
          "style": {
            width: typeof width === "number" ? `${width}px` : width
          }
        }, null);
      });
      return createVNode("ul", {
        "class": prefixCls
      }, [rowList]);
    };
  }
});

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