import{b as P,m as z}from"./primevue-CfIk0_DY.js";import{a as k,s as r}from"./index-BxIwIJfy.js";import{u as D}from"./usePortailSession-CohUOVSd.js";import{h as f,b as o,c as s,d as e,t as c,F as h,C as b,v as l,l as y,j as E,f as M,q as v,y as p}from"./vue-core-Di3IuVqe.js";import"./cjs-helpers-psZwOBky.js";import"./vue-cal-DKMVGERa.js";import"./moment-BeHQNF8T.js";const V={class:"flex h-screen flex-col bg-gray-50"},A={class:"flex items-center justify-between border-b bg-white px-6 py-3 shadow-sm"},F={class:"flex items-center gap-3 min-w-0"},G=["src","alt"],L={key:1,src:k,alt:"OMAG",class:"h-8"},O={class:"text-lg font-bold text-gray-800 hidden sm:inline truncate"},T={class:"hidden md:flex items-center gap-1"},$={class:"flex items-center gap-3"},q={class:"text-right hidden sm:block"},I={class:"text-sm font-medium text-gray-700"},H={class:"text-xs text-gray-400"},J={class:"flex-1 overflow-auto p-4 md:p-6 pb-20 md:pb-6"},K={class:"md:hidden fixed bottom-0 left-0 right-0 bg-white border-t shadow-lg z-50"},Q={class:"flex justify-around py-2"},R=["onClick"],U={class:"text-[10px] font-medium"},le={__name:"PortailSalarieLayout",setup(W){const{deconnexion:w}=D("salarie"),C=p(()=>{const a=r.state.portailSalarieEmploye;return a?`${a.Prenom} ${a.Nom}`:""}),S=p(()=>r.state.portailSalarieEmploye?.Matricule||""),m=p(()=>r.state.portailSalarieNomSociete||""),u=p(()=>r.state.enreg_societe?.logo_image||null),_=[{label:"Accueil",icon:"pi pi-home",to:"/portail-salarie/accueil"},{label:"Bulletins",icon:"pi pi-file",to:"/portail-salarie/bulletins"},{label:"Congés",icon:"pi pi-calendar",to:"/portail-salarie/conges"},{label:"Documents",icon:"pi pi-folder-open",to:"/portail-salarie/documents"},{label:"Profil",icon:"pi pi-user",to:"/portail-salarie/profil"}],N=()=>w("manuel");return(a,i)=>{const x=P,g=f("router-link"),j=f("router-view"),B=z;return o(),s("div",V,[e("header",A,[e("div",F,[u.value?(o(),s("img",{key:0,src:u.value,alt:m.value,class:"h-14 w-14 rounded object-contain bg-white"},null,8,G)):(o(),s("img",L)),e("span",O,c(m.value),1),i[0]||(i[0]=e("span",{class:"rounded bg-blue-100 px-2 py-0.5 text-xs font-semibold text-blue-700 shrink-0"}," Espace salarié ",-1))]),e("nav",T,[(o(),s(h,null,b(_,t=>l(g,{key:t.to,to:t.to,custom:""},{default:y(({isActive:n,navigate:d})=>[l(x,{label:t.label,icon:t.icon,severity:n?"primary":"secondary",text:!n,onClick:d,size:"small"},null,8,["label","icon","severity","text","onClick"])]),_:2},1032,["to"])),64))]),e("div",$,[e("div",q,[e("div",I,c(C.value),1),e("div",H,c(S.value),1)]),E(l(x,{icon:"pi pi-sign-out",severity:"secondary",text:"",rounded:"",size:"small",onClick:N},null,512),[[B,"Déconnexion"]])])]),e("main",J,[l(j)]),i[1]||(i[1]=e("footer",{class:"hidden md:flex items-center justify-center gap-2 py-2 text-xs text-gray-400 border-t bg-white"},[e("span",null,"Propulsé par"),e("a",{href:"https://omag.ma",target:"_blank",rel:"noopener noreferrer",class:"flex items-center gap-1 text-blue-600 hover:text-blue-800 font-medium transition-colors"},[e("img",{src:k,alt:"OMAG",class:"h-3.5"}),M(" omag.ma ")])],-1)),e("nav",K,[e("div",Q,[(o(),s(h,null,b(_,t=>l(g,{key:t.to,to:t.to,custom:""},{default:y(({isActive:n,navigate:d})=>[e("button",{onClick:d,class:v(["flex flex-col items-center gap-1 px-3 py-1 rounded-lg transition-colors",n?"text-blue-600":"text-gray-400"])},[e("i",{class:v([t.icon,"text-lg"])},null,2),e("span",U,c(t.label),1)],10,R)]),_:2},1032,["to"])),64))])])])}}};export{le as default};
