import{f as g,o as b,c as _,b as l,a as o,z as y,q as k,av as E,F as h,r as w,ar as C}from"./vendor-BDR7yMJi.js";import{u as j,S as c,a as D,s as t}from"./index-BSaHX2oa.js";const S={class:"w-full mb-6 flex flex-col sm:flex-row items-center align-baseline gap-3"},M={__name:"SyntheseDesEvaluations",setup($){const{showError:p,showWarn:u}=j(),r=w(),s=C({lecture:!1,ajout:!1,modif:!1,supp:!1,devalidation:!1,validation:!1}),m=async()=>{try{const e=(await D.post(`${t.lienApi}/verifierDroit/${t.state.dbCommun6}`,{id_utilisateur:t.userId,id_page:512,mail:t.state.userCloud.mail},{headers:{"Content-Type":"application/json"}})).data;e&&Object.keys(e).length>0&&(s.lecture=e.lecture,s.ajout=e.ajout,s.modif=e.modif,s.supp=e.supp,s.devalidation=e.devalidation,s.validation=e.validation),s.lecture||(u("Vous n'avez pas le droit, veuillez consulter l'administrateur"),c("SyntheseDesEvaluations"))}catch(a){p("Une erreur est survenue : "+(a.response?.data?.message||a.message))}finally{t.state.afficher_in_progress=!1}},f=()=>{},d=()=>{},v=()=>{};return g(async()=>{await m()}),(a,e)=>{const i=y,x=E;return b(),_(h,null,[e[3]||(e[3]=l("div",{class:"btns flex items-center gap-2"},null,-1)),l("div",S,[o(i,{icon:"pi pi-refresh",label:"Afficher",text:"",onClick:e[0]||(e[0]=n=>f())}),o(i,{icon:"pi pi-cog",label:"Actions",text:"",onClick:e[1]||(e[1]=n=>r.value.toggle(n))}),o(i,{icon:"pi pi-times",label:"Fermer",text:"",onClick:e[2]||(e[2]=n=>k(c)("SyntheseDesEvaluations"))}),o(x,{ref_key:"actionsMenu",ref:r,model:[{label:"Exporter vers Excel",icon:"pi pi-file-excel",command:()=>d()},{label:"Imprimer",icon:"pi pi-print",command:()=>v()}],popup:!0},null,8,["model"])])],64)}}};export{M as default};
