2024-11-21 10:08:37 +01:00
|
|
|
import { defineStore } from "pinia";
|
|
|
|
|
import { ref, watch } from "vue";
|
2024-11-21 13:20:57 +01:00
|
|
|
import { usePageStore } from "./page";
|
2024-11-21 10:08:37 +01:00
|
|
|
|
|
|
|
|
export const useVirtualSampleStore = defineStore("virtual-sample", () => {
|
|
|
|
|
const activeTab = ref("dynamic");
|
|
|
|
|
const currentFile = ref(null);
|
|
|
|
|
|
2024-11-21 13:20:57 +01:00
|
|
|
const { page } = usePageStore();
|
|
|
|
|
const step = page.steps.find((step) => step.id === "virtualSample");
|
|
|
|
|
|
2024-11-21 10:08:37 +01:00
|
|
|
watch(activeTab, () => (currentFile.value = null));
|
|
|
|
|
|
2024-11-21 13:20:57 +01:00
|
|
|
return { activeTab, currentFile, step };
|
2024-11-21 10:08:37 +01:00
|
|
|
});
|