diff --git a/src/stores/ConfigurationStore.ts b/src/stores/ConfigurationStore.ts new file mode 100644 index 0000000000000000000000000000000000000000..fb9e0dd0d13fecdf719f8bc68970fe793b465027 --- /dev/null +++ b/src/stores/ConfigurationStore.ts @@ -0,0 +1,38 @@ +import { defineStore } from 'pinia' +export const useConfigurationStore = defineStore('ConfigurationStore', { + state: () => ({ + commitment: '', + experience: '', + challenges: [] + }), + actions: { + setCommitment(commitment: string) { + this.commitment = commitment + }, + setExperience(experience: string) { + this.experience = experience + }, + setChallenges(challenges: Array<string>) { + this.challenges = challenges + }, + resetConfiguration() { + this.commitment = '' + this.experience = '' + this.challenges = [] + } + }, + getters: { + getCommitment(): string { + return this.commitment + }, + getExperience(): string { + return this.experience + }, + getChallenges(): string { + return this.challenges + } + }, + persist: { + enabled: true, + } +});