import{s as e,b as i}from"./index-BxIwIJfy.js";import{a as s}from"./vue-core-Di3IuVqe.js";function d(){const n=()=>typeof window<"u"&&window.innerWidth<768,u=s({value:n()||Number(e.state.userCommun6?.vue_liste_defaut)===1?1:0}),a=[{label:"Tableau",value:0,icon:"pi pi-list"},{label:"Kanban",value:1,icon:"pi pi-th-large"}],r=async t=>{if(!(t!==0&&t!==1)){e.state.userCommun6&&(e.state.userCommun6.vue_liste_defaut=t);try{await i.put(`${e.lienApi}/utilisateurVueListe/${e.state.dbCommun6}`,{id_utilisateur:e.userId,vue_liste_defaut:t},{headers:{"Content-Type":"application/json"}})}catch{}}};return{layout:u,viewOptions:a,onLayoutChange:()=>{n()||r(u.value?.value===1?1:0)}}}export{d as u};
