import{b as M,m as S}from"./primevue-CfIk0_DY.js";import{a as j,s as a}from"./index-BxIwIJfy.js";import{u as I}from"./usePortailSession-CohUOVSd.js";import{h as b,b as i,c as m,d as t,t as d,F as x,C as f,k as h,l as g,v as u,j as L,q as v,y as l}from"./vue-core-Di3IuVqe.js";import"./cjs-helpers-psZwOBky.js";import"./vue-cal-DKMVGERa.js";import"./moment-BeHQNF8T.js";const O={class:"flex h-screen flex-col bg-gray-50"},P={class:"flex items-center justify-between border-b bg-white px-6 py-3 shadow-sm"},F={class:"flex items-center gap-3"},T={class:"text-lg font-bold text-gray-800 hidden sm:inline"},U={class:"hidden md:flex items-center gap-1"},V={class:"flex items-center gap-3"},q={class:"text-right hidden sm:block"},A={class:"text-sm font-medium text-gray-700"},G={class:"text-xs text-gray-400"},R={class:"flex-1 overflow-auto p-4 md:p-6 pb-20 md:pb-6"},H={class:"md:hidden fixed bottom-0 left-0 right-0 bg-white border-t shadow-lg z-50"},J={class:"flex justify-around py-2"},K=["onClick"],Q={class:"text-[10px] font-medium"},st={__name:"PortailCabinetLayout",setup(W){const{deconnexion:y}=I("cabinet"),C=l(()=>a.state.portailCabinetSociete?.Nom||""),k=l(()=>a.state.portailCabinetContact?.nom_contact||a.state.portailCabinetContact?.email||""),w=l(()=>a.state.portailCabinetNomCabinet||""),D={declarations:{to:"/portail-cabinet/declarations",label:"Declarations"},echeances:{to:"/portail-cabinet/echeances",label:"Echeances"},documents:{to:"/portail-cabinet/documents",label:"Documents"},indicateurs:{to:"/portail-cabinet/indicateurs",label:"Indicateurs"}},_=l(()=>{const c=[{label:"Accueil",icon:"pi pi-home",to:"/portail-cabinet/accueil"}],o=a.state.portailCabinetModules||[];for(const n of o){const s=D[n.code_module];s&&c.push({label:s.label,icon:n.icone||"pi pi-file",to:s.to})}return c.push({label:"Profil",icon:"pi pi-user",to:"/portail-cabinet/profil"}),c}),N=l(()=>_.value.slice(0,5)),B=()=>y("manuel");return(c,o)=>{const n=M,s=b("router-link"),E=b("router-view"),z=S;return i(),m("div",O,[t("header",P,[t("div",F,[o[0]||(o[0]=t("img",{src:j,alt:"OMAG",class:"h-8"},null,-1)),t("span",T,d(C.value),1),o[1]||(o[1]=t("span",{class:"rounded bg-teal-100 px-2 py-0.5 text-xs font-semibold text-teal-700"}," Espace cabinet ",-1))]),t("nav",U,[(i(!0),m(x,null,f(_.value,e=>(i(),h(s,{key:e.to,to:e.to,custom:""},{default:g(({isActive:r,navigate:p})=>[u(n,{label:e.label,icon:e.icon,severity:r?"primary":"secondary",text:!r,onClick:p,size:"small"},null,8,["label","icon","severity","text","onClick"])]),_:2},1032,["to"]))),128))]),t("div",V,[t("div",q,[t("div",A,d(k.value),1),t("div",G,d(w.value),1)]),L(u(n,{icon:"pi pi-sign-out",severity:"secondary",text:"",rounded:"",size:"small",onClick:B},null,512),[[z,"Deconnexion"]])])]),t("main",R,[u(E)]),t("nav",H,[t("div",J,[(i(!0),m(x,null,f(N.value,e=>(i(),h(s,{key:e.to,to:e.to,custom:""},{default:g(({isActive:r,navigate:p})=>[t("button",{onClick:p,class:v(["flex flex-col items-center gap-1 px-3 py-1 rounded-lg transition-colors",r?"text-teal-600":"text-gray-400"])},[t("i",{class:v([e.icon,"text-lg"])},null,2),t("span",Q,d(e.label),1)],10,K)]),_:2},1032,["to"]))),128))])])])}}};export{st as default};
