import { computed } from 'vue';
import { defineStore } from 'pinia';

export const useUserStore = defineStore('user', () => {
    const user_name = computed(() => localStorage.getItem('user_name') || 'Demo User')
    const user_access = computed(() => localStorage.getItem('user_access') || 'Super Admin')
    const user_uid = computed(() => localStorage.getItem('user_uid') || 'Jakarta Raya')
    const user_image = computed(() => localStorage.getItem('user_image') || 'https://iidamidamerica.org/wp-content/uploads/2020/12/male-placeholder-image.jpeg')

    return { user_name, user_access, user_image, user_uid }
})