const load = [
  "load/icon.png",
  "load/icon-2.png",
  "index/bg.jpg",
  "music-on.png",
  "share.jpg",
];

const page = [
  "index/title.png",
  "index/time.png",
  "index/paper.png",
  "index/text.png",
  "index/megaphone.png",
  "index/logo.png",
  "index/line.png",
  "index/card-5.png",
  "index/card-3.png",
  "index/card-4.png",
  "index/card-2.png",
  "index/card-1.png",
  "index/bg.jpg",
  "index/btn.png",

  "prize/tips.png",
  "prize/star.png",
  "prize/draw-text.png",
  "prize/light.png",
  "prize/myPrize-box.png",
  "prize/no-prize.png",
  "prize/cls-btn.png",
  "prize/copy-btn.png",
  "prize/draw-box.png",

  "qa/paper.png",
  "qa/megaphone.png",
  "qa/cls-btn.png",
  "qa/correct.png",
  "qa/create-btn.png",
  "qa/incorrect.png",

  "question-list/megaphone.png",
  "question-list/card-3.png",
  "question-list/btn.png",
  "question-list/card-1.png",
  "question-list/card-2.png",
  "question-list/arrow-l.png",

  "result/share-tips.svg",
  "result/go-share-btn.png",
  "result/poster-1.jpg",
  "result/go-draw-btn.png",
  "result/cls-btn.png",
  "result/card-1.png",

  "rule/rule-box.png",
  "rule/icon.png",
  "rule/arrow.png",
  "rule/cls-btn.png",
];

// 处理为vite引入图片格式
function imgCreate(url, img) {
  let i = new URL(`../assets/images/${url}`, import.meta.url).href;
  img.push(i);
}

const loadImg = [];
const pageImg = [];

load.forEach((element) => {
  imgCreate(element, loadImg);
});

page.forEach((element) => {
  imgCreate(element, pageImg);
});

export { loadImg, pageImg };
