import { defineStore } from 'pinia';
import { store } from '@/store';
import { http } from "@/utils/request";

export const useDataStore = defineStore({
  id: 'app-data',
  state: () => ({
    date: ''
  }),
  getters: {
    getDateGetter(state) {
      return state.date || Number(new Date())
    }
  },
  actions: {
    setDate(date) {
      this.date = date
    }
  },
  persist: {
    paths: ['date']
  }
})