import { defineStore } from 'pinia' import { ref, shallowRef } from 'vue' import type { SceneNode, Choice } from '@engine/types' export const useGameStore = defineStore('game', () => { const currentScene = shallowRef(null) const choices = ref([]) const gameEnded = ref(false) function setScene(scene: SceneNode) { currentScene.value = scene } function setChoices(list: Choice[]) { choices.value = list } function clearChoices() { choices.value = [] } function setGameEnded(val: boolean) { gameEnded.value = val } return { currentScene, choices, gameEnded, setScene, setChoices, clearChoices, setGameEnded } })