import { defineStore } from 'pinia'

export const useParkAreaStore = defineStore('parkArea', {
  state: () => ({
    parkId: 0,
    parkList: [],
  }),
  actions: {
    changeId(id) { this.parkId = id },
    changeList(list) {
      this.parkList = list
      if (list.length > 0 && this.parkId === 0) this.parkId = list[0].ID
    },
  },
})
