'use strict';

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

var vue = require('vue');
var props = require('./props.cjs');

var Paragraph = /* @__PURE__ */ vue.defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "SkeletonParagraph",
  props: 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 vue.createVNode("li", {
          "key": index,
          "style": {
            width: typeof width === "number" ? `${width}px` : width
          }
        }, null);
      });
      return vue.createVNode("ul", {
        "class": prefixCls
      }, [rowList]);
    };
  }
});

exports.default = Paragraph;
//# sourceMappingURL=Paragraph.cjs.map
