import { defineStore } from 'pinia';
import type { Hero } from '~~/types/hero';

interface HeroState {
    hero: Hero | null;

}

export const useHeroStore = defineStore('hero', {
    state: (): HeroState => ({
        hero: null,
    }),
    actions: {
        setHero(newHero: Hero | null): void {
            this.hero = newHero;
        }
    }
});