import{o as l,j as s,H as a,b as i,k as n,y as d,E as _}from"./vue-core-Di3IuVqe.js";import{u as f,b as g,s as r,S as y}from"./index-BxIwIJfy.js";import h from"./PointageHoraire-Ba6b0395.js";import v from"./PointageJournalier-CNs7LOdr.js";import"./cjs-helpers-psZwOBky.js";import"./primevue-CfIk0_DY.js";import"./vue-cal-DKMVGERa.js";import"./moment-BeHQNF8T.js";import"./useDropdownColumn-rbNcVFvJ.js";import"./ComboDynamique-BzWI4ISP.js";import"./SelectEmployes-DNkrC5Rv.js";import"./ag-grid-B5G7j3Qp.js";import"./useColonnesPreferences-DA6gXbLc.js";import"./vuedraggable.umd-D3ZCcGIp.js";import"./ExcelImportDialog-C-8kz2ek.js";import"./export-files-DFMiSRgA.js";import"./InfoBulle-R_p1ZfIR.js";import"./Imprimer-DluCFs7h.js";import"./ReportViewer-BNzhW7G2.js";import"./stimulsoft-B2-Y-rC1.js";import"./PDFButton-DhVJ6hNy.js";const W={__name:"pointage",setup(j){const{showWarn:p,showError:m}=f(),u=d(()=>r.state.enreg_option_paie?.type_pointage===2),e=_({lecture:!1,ajout:!1}),c=async()=>{try{const t=(await g.post(`${r.lienApi}/verifierDroit/${r.state.dbCommun6}`,{id_utilisateur:r.userId,id_page:3201,mail:r.state.userCloud.mail},{headers:{"Content-Type":"application/json"}})).data;t&&Object.keys(t).length>0&&(e.lecture=t.lecture,e.ajout=t.ajout),e.lecture||(p("Vous n'avez pas le droit, veuillez consulter l'administrateur"),y("Pointage"))}catch(o){m("Une erreur est survenue : "+(o.response?.data?.message||o.message))}};return l(async()=>{await c()}),(o,t)=>u.value?s((i(),n(h,{key:0},null,512)),[[a,e.lecture]]):s((i(),n(v,{key:1},null,512)),[[a,e.lecture]])}};export{W as default};
