import {defineStore} from "pinia"; import {ref} from "vue"; export const useDrawerStore = defineStore('drawer', () => { const visible = ref(false); const transactionType = ref(null) const categoryType = ref(null) const categoryId = ref(null) const setVisible = (isVisible: boolean) => { visible.value = isVisible; } const setTransactionType = (type: string) => { transactionType.value = type; } const setCategoryType = (type: string) => { categoryType.value = type; } const setCategoryId = (id: string|null) => { categoryId.value = id } return {visible, transactionType, categoryType, categoryId, setTransactionType, setCategoryType, setVisible, setCategoryId}; })