import {defineStore} from "pinia";

interface UserState {
    user: string;
    theme: string;
    isLogin: boolean;
    identity: 'admin' | 'user' | 'systemAdmin';
}

export const useUserStore = defineStore('User', {
    state: (): UserState => ({
        user: "AlexJR",
        theme: 'light',
        isLogin: false,
        identity: 'user',
    }),
    actions: {
        async login() {
            this.isLogin = true;

        },
        async logout() {
            this.isLogin = false;
        }
    }
});