import { defineStore } from 'pinia'

export const useQuestionStore = defineStore({
    id: 'questions',
    state: () => ({
        questions: [],
        currentQuestion: 0
    }),
    actions: {
        storeQuestions(questionArray) {
            this.questions = [...questionArray]
        },
        nextQuestion() {
            this.currentQuestion ++
        },
        previousQuestion() {
            this.currentQuestion --
        }
    }
})