import { reactive } from "vue"

export const globalStore = reactive({
  select_template: '',
  people_count: 0,
  draw_chances: 0,
  game_chances: 0,
  lotteryCount: 0,
  result_url: '',
  mergeId: 61,
  generateStatus: false,
  generateImgTemplates: [],
  chartsBattle: false,
  invitees: 0,
  followed_official: false,
  cap_scan: 0,
  game_chances_view_recipes: 0,
  POINT_1_ICESIP: 100,
  POINT_1_ICON: 100,
  MAX_CAP_SCAN: 5,
  CONSUME_POINT_1_PER_DRAW: 1000,
  MAX_INVITE_DAILY: 5,
  MAX_VIEW_RECIPES_DAILY: 3,
  reducerDrawChances () {
    this.draw_chances--
  },
  reducerGameChances () {
    this.game_chances--
  },
  lotteryCut () {
    this.lotteryCount--
  },
  lotteryAdd () {
    this.lotteryCount++
  },
  updateViewRecipesCount () {
    this.game_chances_view_recipes = this.game_chances_view_recipes >= this.MAX_VIEW_RECIPES_DAILY ? this.MAX_VIEW_RECIPES_DAILY : this.game_chances_view_recipes + 1
  }
})