import {defineStore} from "pinia";
import {ref} from "@vue/reactivity";
import type {Ref} from "@vue/reactivity";
import type {MenuGroup, MenuItem} from "~/types/layout";

export const useLayoutStore = defineStore('layout', () => {
    /**
     * Le nom du layout actif
     */
    const name: Ref<string> = ref('default')

    const menus: Ref<Record<string, MenuGroup | MenuItem>> = ref({})
    const menusOpened: Ref<Record<string, boolean>> = ref({})

    return {
        name,
        menus,
        menusOpened,
    }
})
