import {defineStore} from "pinia";

interface UserState {
    user: string;
    theme: string;
    isLogin: boolean;
    isAdministrator: boolean;
}

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

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