import{u as c,c as m,a as x,s as o,S as f}from"./index-BSaHX2oa.js";import{f as g,g as _,o as v,c as h,b as s,a as r,j as n,h as w,B as y,q as b,ar as k}from"./vendor-BDR7yMJi.js";const j={class:"max-w-[50rem] flex flex-col mx-auto size-full"},C={class:"mb-auto flex justify-center z-50 w-full py-4"},z={class:"px-4 sm:px-6 lg:px-8","aria-label":"Global"},B={id:"content"},D={class:"text-center py-10 px-4 sm:px-6 lg:px-8"},O={class:"mt-5 flex flex-col justify-center items-center gap-2 sm:flex-row sm:gap-3"},T={class:"mt-auto text-center py-5"},V={class:"max-w-[85rem] mx-auto px-4 sm:px-6 lg:px-8"},q={class:"text-sm text-gray-500"},E={__name:"404",setup(A){const{showError:i,showWarn:d}=c(),p=new Date().getFullYear(),t=k({lecture:!1,ajout:!1,modif:!1,supp:!1,devalidation:!1,validation:!1}),u=async()=>{try{const e=(await x.post(`${o.lienApi}/verifierDroit/${o.state.dbCommun6}`,{id_utilisateur:o.userId,id_page:402,mail:o.state.userCloud.mail},{headers:{"Content-Type":"application/json"}})).data;e&&Object.keys(e).length>0&&(t.lecture=e.lecture,t.ajout=e.ajout,t.modif=e.modif,t.supp=e.supp,t.devalidation=e.devalidation,t.validation=e.validation),t.lecture||(d("Vous n'avez pas le droit, veuillez consulter l'administrateur"),f("404"))}catch(a){i("Une erreur est survenue : "+(a.response?.data?.message||a.message))}finally{o.state.afficher_in_progress=!1}};return g(async()=>{await u()}),(a,e)=>{const l=_("router-link");return v(),h("div",j,[s("header",C,[s("nav",z,[r(l,{class:"flex-none text-xl font-semibold sm:text-3xl",to:"/","aria-label":"OMAG"},{default:n(()=>[...e[0]||(e[0]=[s("img",{src:m,class:"max-h-12 logo-omag",alt:"Omag"},null,-1)])]),_:1})])]),s("main",B,[s("div",D,[e[2]||(e[2]=s("h1",{class:"block text-7xl font-bold text-gray-800 sm:text-9xl"},"404",-1)),e[3]||(e[3]=s("p",{class:"mt-3 text-gray-600"},"Oops, quelque chose s'est mal passé.",-1)),e[4]||(e[4]=s("p",null,"Désolé, nous n'avons pas pu trouver votre page.",-1)),s("div",O,[r(l,{class:"w-full sm:w-auto py-3 px-4 inline-flex justify-center items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-omag text-white hover:opacity-85 disabled:opacity-50 disabled:pointer-events-none",to:"/"},{default:n(()=>[...e[1]||(e[1]=[s("svg",{class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[s("path",{d:"m15 18-6-6 6-6"})],-1),w(" Home ",-1)])]),_:1})])])]),s("footer",T,[s("div",V,[s("p",q,"© Tous droits réservés. "+y(b(p))+".",1)])])])}}};export{E as default};
