import { ref, watch } from 'vue' // Créer une référence pour isAdminActive const isAdminActive = ref(JSON.parse(localStorage.getItem('isAdminActive') || 'false')) // Surveiller les changements de isAdminActive et mettre à jour localStorage watch(isAdminActive, (newValue) => { localStorage.setItem('isAdminActive', JSON.stringify(newValue)) }) // Exporter une fonction pour utiliser isAdminActive export function useAdminMode() { return { isAdminActive } }