// stores/counter.js
import { nextTick, onMounted, ref } from "vue";
import { defineStore } from "pinia";

export const useAudioStore = defineStore("audio", {
  state: () => {
    return { audioStatus: false };
  },
  // 也可以定义为
  // state: () => ({ count: 0 })
  actions: {
    setState(payload) {
      if (payload) {
        this.audioStatus = payload.status;
        return;
      }
      this.audioStatus = !this.audioStatus;
    },
  },
});
