Files
wordIn/src/store/index.ts
T

17 lines
503 B
TypeScript

import IHistory from '@/scripts/history';
import { Wordset } from '@/scripts/wordsets';
import { defineStore} from 'pinia'
import { ref } from 'vue'
export const useMainStore = defineStore('main', () => {
const sets = ref({});
const history = ref(new IHistory())
const wordsets = ref(new Wordset())
const isDarkMode = ref(false)
function setDarkMode(value: boolean) {
isDarkMode.value = value;
}
return {
sets,history,wordsets,setDarkMode,isDarkMode
}
})