import{p as V,f as x,b as e,g as A,i as d,z as a,h as n,n as m,u as c,F as f,d as u,e as p,t as v,m as b,c as B,s as C,j as l}from"./index-CeMVzSB6.js";const j={class:"min-h-screen bg-slate-100"},M={class:"bg-white border-b border-slate-200 sticky top-0 z-50"},N={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"},z={class:"flex items-center justify-between h-16"},L={class:"hidden md:flex items-center gap-1"},P={class:"flex items-center gap-3"},$={class:"text-right hidden sm:block"},D={class:"text-sm font-medium text-slate-800"},F={class:"text-xs text-slate-500"},H={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},K={__name:"Dashboard",setup(S){const y=C(),r=V(),k=B(()=>{var s;return r.isPlatformAdmin?"Plattform-Admin":((s=r.tenant)==null?void 0:s.name)||""});function i(s){return r.isPlatformAdmin,!0}async function w(){r.logout(),y.push("/login")}return(s,t)=>{var g,h;const o=b("router-link"),_=b("router-view");return l(),x("div",j,[e("header",M,[e("div",N,[e("div",z,[t[9]||(t[9]=A('<div class="flex items-center gap-3"><div class="w-9 h-9 rounded-lg bg-primary flex items-center justify-center"><svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 17V7m0 10a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h2a2 2 0 012 2m0 10V7m0 10a2 2 0 002 2h2a2 2 0 002-2M9 7a2 2 0 012-2h2a2 2 0 012 2m0 10V7"></path></svg></div><span class="text-lg font-bold text-slate-800">fahrschuldesk</span></div>',1)),e("nav",L,[d(o,{to:"/dashboard",class:m(["px-3 py-2 rounded-lg text-sm font-medium transition-colors",s.$route.path==="/dashboard"?"bg-primary text-white":"text-slate-600 hover:bg-slate-100"])},{default:a(()=>[...t[0]||(t[0]=[n(" Dashboard ",-1)])]),_:1},8,["class"]),c(r).isPlatformAdmin?(l(),x(f,{key:0},[d(o,{to:"/admin/tenants",class:m(["px-3 py-2 rounded-lg text-sm font-medium transition-colors",s.$route.path.startsWith("/admin/tenants")?"bg-primary text-white":"text-slate-600 hover:bg-slate-100"])},{default:a(()=>[...t[1]||(t[1]=[n(" Fahrschulen ",-1)])]),_:1},8,["class"]),d(o,{to:"/admin/invoices",class:m(["px-3 py-2 rounded-lg text-sm font-medium transition-colors",s.$route.path.startsWith("/admin/invoices")?"bg-primary text-white":"text-slate-600 hover:bg-slate-100"])},{default:a(()=>[...t[2]||(t[2]=[n(" Rechnungen ",-1)])]),_:1},8,["class"]),d(o,{to:"/admin/audit-logs",class:m(["px-3 py-2 rounded-lg text-sm font-medium transition-colors",s.$route.path.startsWith("/admin/audit")?"bg-primary text-white":"text-slate-600 hover:bg-slate-100"])},{default:a(()=>[...t[3]||(t[3]=[n(" Audit-Log ",-1)])]),_:1},8,["class"])],64)):(l(),x(f,{key:1},[i()?(l(),u(o,{key:0,to:"/users",class:"px-3 py-2 rounded-lg text-sm font-medium text-slate-600 hover:bg-slate-100 transition-colors"},{default:a(()=>[...t[4]||(t[4]=[n(" Benutzer ",-1)])]),_:1})):p("",!0),i()?(l(),u(o,{key:1,to:"/calendar",class:"px-3 py-2 rounded-lg text-sm font-medium text-slate-600 hover:bg-slate-100 transition-colors"},{default:a(()=>[...t[5]||(t[5]=[n(" Kalender ",-1)])]),_:1})):p("",!0),i()?(l(),u(o,{key:2,to:"/messenger",class:"px-3 py-2 rounded-lg text-sm font-medium text-slate-600 hover:bg-slate-100 transition-colors"},{default:a(()=>[...t[6]||(t[6]=[n(" Messenger ",-1)])]),_:1})):p("",!0),i()||i()?(l(),u(o,{key:3,to:"/learning",class:"px-3 py-2 rounded-lg text-sm font-medium text-slate-600 hover:bg-slate-100 transition-colors"},{default:a(()=>[...t[7]||(t[7]=[n(" Lernsoftware ",-1)])]),_:1})):p("",!0)],64))]),e("div",P,[e("div",$,[e("p",D,v(((g=c(r).user)==null?void 0:g.name)||((h=c(r).user)==null?void 0:h.first_name)),1),e("p",F,v(k.value),1)]),e("button",{onClick:w,class:"p-2 rounded-lg text-slate-400 hover:text-slate-600 hover:bg-slate-100 transition-colors",title:"Abmelden"},[...t[8]||(t[8]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})],-1)])])])])])]),e("main",H,[d(_)])])}}};export{K as default};
