import { defineStore } from "pinia"; import { ref, watch } from "vue"; import { usePageStore } from "./page"; export const useVirtualSampleStore = defineStore("virtual-sample", () => { const activeTab = ref("dynamic"); const currentFile = ref(null); const isLoopAnimationEnabled = ref(false); const { page } = usePageStore(); const step = page.steps.find((step) => step.id === "virtualSample"); watch(activeTab, () => (currentFile.value = null)); return { activeTab, currentFile, step, isLoopAnimationEnabled }; });