var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/CySwiper/CarouselList.jsx
var CarouselList_exports = {};
__export(CarouselList_exports, {
  default: () => CarouselList_default
});
module.exports = __toCommonJS(CarouselList_exports);
var import_antd = require("antd");
var import_react = require("react");
var import_index_module = __toESM(require("./index.module.less"));
var data = [
  "人生若只如初见",
  "何事西风悲画扇",
  "等闲变却故人心",
  "却道故人心易变",
  "骊山语罢清宵半",
  "泪雨霖铃终不怨",
  "何如薄幸锦衣郎",
  "比翼连枝当日愿",
  "你见，或者不见我",
  "我就在那里，不悲不喜。",
  "你念，或者不念我",
  "情就在那里，不来不去",
  "你爱或者不爱我，爱就在那里",
  "不增不减",
  "你跟，或者不跟我",
  "我的手就在你的手里",
  "不舍不弃",
  "来我怀里",
  "或者",
  "让我住进你的心里",
  "默然相爱，寂静喜欢"
];
var CarouselList = () => {
  const twoColors = {
    "0%": "skyblue",
    // "100%": "#00D5FF",
    "100%": "#11d8ff"
  };
  (0, import_react.useEffect)(() => {
    if (Swiper) {
      var mySwiper = new Swiper(".swiper1", {
        mousewheel: true,
        direction: "vertical",
        // 垂直切换选项
        loop: true,
        // 循环模式选项
        loopPreventsSlide: true,
        //当swiper 正在过渡时，阻止slide 前进后退的切换操作
        observer: true,
        observeParents: true,
        slidesPerView: 10,
        //swiper容器同时展示的元素数量
        spaceBetween: 10,
        //元素之间间隔距离
        speed: 1e3,
        //slider自动滑动开始到结束的时间
        // autoplay: false,
        autoplay: {
          //开启自动切换
          delay: 10,
          //自动切换的时间间隔
          stopOnLastSlide: false,
          //当切换到最后一个slide时停止自动切换
          disableOnInteraction: false
          //用户操作swiper之后，是否停止自动切换效果
        }
      });
      document.querySelector(".swiper1").addEventListener("mouseenter", function() {
        mySwiper.params.speed = 20;
        mySwiper.autoplay.stop();
      });
      document.querySelector(".swiper1").addEventListener("mouseleave", function() {
        mySwiper.params.speed = 1e3;
        mySwiper.autoplay.start();
      });
    }
  }, []);
  return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
    "div",
    {
      className: "swiper1",
      style: {
        height: 600,
        overflow: "hidden"
      }
    },
    /* @__PURE__ */ React.createElement("div", { className: import_index_module.default.swiperWrapper + " swiper-wrapper" }, data == null ? void 0 : data.map((item) => {
      var randomInt = Math.floor(Math.random() * 101);
      let left = randomInt * 22 / 5 + 16;
      return /* @__PURE__ */ React.createElement(
        "div",
        {
          className: "swiper-slide",
          style: {
            padding: "16px 0 16px 24px"
          }
        },
        /* @__PURE__ */ React.createElement(
          "div",
          {
            style: {
              width: 12,
              height: 12,
              borderRadius: 12,
              background: "white",
              left: left + "px",
              position: "absolute",
              top: 53,
              zIndex: 999999,
              boxShadow: "0px 0px 12px  #CCEAFF"
            }
          }
        ),
        /* @__PURE__ */ React.createElement(
          "div",
          {
            style: {
              display: "flex",
              justifyContent: "space-between",
              paddingRight: 46,
              fontSize: 20,
              color: "white"
            }
          },
          /* @__PURE__ */ React.createElement("span", null, item),
          /* @__PURE__ */ React.createElement("span", { style: { color: "#11d8ff" } }, randomInt, "%")
        ),
        /* @__PURE__ */ React.createElement(
          import_antd.Progress,
          {
            style: { width: 470 },
            strokeColor: twoColors,
            percent: randomInt,
            format: () => null,
            trailColor: "rgba(80, 121, 150, 0.6)"
          }
        )
      );
    }))
  ));
};
var CarouselList_default = CarouselList;
