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 } }