import { defineStore } from 'pinia'

export const useCoupleStore = defineStore('couple', {
  state: () => ({
    fragmentNotEnoughShow: false, //碎片不足

    helpShow: false, //帮助展示

    topRewardShow: false, // 前三名奖励展示
    topReward: {}, //前三名奖励项

    myRanking: {}, // 我的排名

    TipsShow: false, // 金币不足提示
    needCheckInTipsShow: false, // 需要补签提示
    signInSuccessShow: false, // 签到成功提示

    crystal: 0, //水晶数量
    debris: 0, //碎片数量

    rewardShow: false, //奖励弹窗
    reward: {}, //奖励

    resultShow: false,
    result: [], //抽奖结果

    drawRecordShow: false,
    myRecords: [], //我的抽奖记录

    receiveRecordShow: false,
    receiveRecord: [], //领取水晶&碎片记录

    signInInfo: {}, // 签到奖池

    exchangeConfirmShow: false, // 兑换确认弹窗
    exchangeItem: null, // 当前兑换的物品
  }),
  actions: {
    setResult(data) {
      this.result = data
    },
    setMyRecords(data) {
      this.myRecords = data
    },
    setRecord(data) {
      this.record = data
    },
  },
})
