import {defineStore} from "pinia";
import {ref} from 'vue'
import {getRolesInterface} from "@/api/login.js";

export const useRolesStore = defineStore('rolesStore', () => {
    const liveRoles = ref([])
    const currentRole = ref('')

    const getRoles = async () => {
        const res = await getRolesInterface()
        liveRoles.value = res.data
    }

    return {
        liveRoles, currentRole,
        getRoles
    }
})

