2 lines
22 KiB
JavaScript
2 lines
22 KiB
JavaScript
import{_ as I}from"./8DBoKuB3.js";import{e as T,f as J,g as K,ad as N,o as n,c as l,a as e,t as h,k as v,F as b,r as B,j as H,l as w,m as M,h as U,p as Q,K as q,q as X,s as Y,b as R,w as j,y as F,ae as G,L as E,i as W,d as P,V as Z}from"./BsgqXOrB.js";import{u as ee}from"./VE1TOSQ_.js";const te={class:"text-base leading-none"},oe={class:"hidden sm:inline"},ne={key:0,class:"absolute right-0 mt-2 w-44 bg-slate-800 border border-slate-700 rounded-xl shadow-xl py-1 z-50"},se=["onClick"],ae={class:"text-lg leading-none"},le={key:0,class:"ml-auto text-indigo-400"},re=T({__name:"LanguageSwitcher",setup(O){const{locale:o,locales:S}=J(),d=w(!1),x=w(null),r=M(()=>S.value),s=M(()=>o.value),k={hu:"🇭🇺",en:"🇬🇧"},z={hu:"Magyar",en:"English"};function g(a){return k[a]||"🌐"}function C(a){return z[a]||a.toUpperCase()}function L(){const c=U("access_token").value;return c?{Authorization:`Bearer ${c}`}:{}}async function V(a){if(a===s.value){d.value=!1;return}o.value=a;try{localStorage.setItem("preferred_language",a)}catch{}try{await $fetch("/api/v1/auth/me/language",{method:"PATCH",headers:{...L(),"Content-Type":"application/json"},body:{preferred_language:a}})}catch(c){console.error("[LanguageSwitcher] Failed to persist language preference:",c)}d.value=!1}function _(a){x.value&&!x.value.contains(a.target)&&(d.value=!1)}return K(()=>{document.addEventListener("click",_)}),N(()=>{document.removeEventListener("click",_)}),(a,c)=>(n(),l("div",{class:"relative",ref_key:"dropdownRef",ref:x},[e("button",{class:"flex items-center gap-2 px-3 py-1.5 text-xs font-medium rounded-lg transition bg-slate-700/50 hover:bg-slate-700 text-slate-300 hover:text-white border border-slate-600/50",onClick:c[0]||(c[0]=p=>d.value=!d.value)},[e("span",te,h(g(s.value)),1),e("span",oe,h(C(s.value)),1),(n(),l("svg",{class:v(["w-3.5 h-3.5 text-slate-400 transition-transform duration-200",{"rotate-180":d.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...c[1]||(c[1]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)])],2))]),d.value?(n(),l("div",ne,[(n(!0),l(b,null,B(r.value,p=>(n(),l("button",{key:p.code,class:v(["flex items-center gap-3 w-full px-4 py-2.5 text-sm transition",p.code===s.value?"bg-indigo-600/20 text-indigo-300":"text-slate-300 hover:bg-slate-700 hover:text-white"]),onClick:$=>V(p.code)},[e("span",ae,h(g(p.code)),1),e("span",null,h(p.name),1),p.code===s.value?(n(),l("span",le,[...c[2]||(c[2]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})],-1)])])):H("",!0)],10,se))),128))])):H("",!0)],512))}}),ie=Q("/logo.svg"),de={class:"min-h-screen bg-slate-900 text-white flex"},ce={class:"flex items-center gap-3 min-w-0"},ue={class:"flex-1 px-2 py-4 space-y-2 overflow-y-auto overflow-x-hidden"},he={key:0},ve=["onClick"],pe=["innerHTML"],ke={class:"ml-2 mt-1 space-y-1 overflow-hidden transition-all duration-200"},ge=["innerHTML"],fe={class:"whitespace-nowrap overflow-hidden"},me=["innerHTML"],we={class:"p-4 border-t border-slate-700 overflow-hidden"},xe={class:"flex-1 flex flex-col min-w-0 transition-all duration-300 ease-in-out"},be={class:"sticky top-0 z-10 bg-slate-800/95 backdrop-blur-sm border-b border-slate-700"},ze={class:"flex items-center justify-between h-16 px-4 lg:px-6"},Me={class:"flex items-center gap-3"},Ce={class:"text-lg font-semibold text-white truncate"},_e={class:"flex items-center gap-3"},ye={class:"w-8 h-8 rounded-full bg-indigo-600 flex items-center justify-center text-sm font-bold text-white"},je={class:"hidden sm:block text-sm text-slate-300"},Be={key:0,class:"absolute right-0 mt-2 w-56 bg-slate-800 border border-slate-700 rounded-xl shadow-xl py-1 z-50"},He={class:"px-4 py-3 border-b border-slate-700"},Se={class:"text-sm font-medium text-white"},Le={class:"text-xs text-slate-400 mt-0.5"},Ve={class:"flex-1 p-4 lg:p-6 overflow-auto"},Ge=T({__name:"default",setup(O){const o=q(),S=X(),d=Y(),x=ee(),r=w(!1),s=w(!1),k=w(!1),z=w(null),g=w(new Set(["Központ"])),C=M(()=>d.userEmail||"Ismeretlen Felhasználó"),L=M(()=>{const i=d.userEmail;return i?i.split("@")[0].split(".").map(t=>t[0]).join("").toUpperCase().slice(0,2):"??"}),V=[{title:"Központ",items:[{path:"/",label:"Dashboard",icon:'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" /></svg>'}]},{title:"Szolgáltatók",items:[{label:"Szolgáltatók",icon:'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" /></svg>',children:[{path:"/providers",label:"Összes szolgáltató",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" /></svg>'},{path:"/providers/pending",label:"Jóváhagyásra váró",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>'}]}]},{title:"Felhasználók & Partnerek",items:[{label:"Garázsok",icon:'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" /></svg>',children:[{path:"/garages",label:"Garázsok listája",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" /></svg>'}]},{label:"Felhasználók",icon:'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z" /></svg>',children:[{path:"/users",label:"Felhasználók listája",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z" /></svg>'},{path:"/persons",label:"Személyek",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" /></svg>'}]}]},{title:"Pénzügyek",items:[{path:"/packages",label:"Csomagok",icon:'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m8.25 3v6.75m0 0l-3-3m3 3l3-3M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z" /></svg>'}]},{title:"Gamification",items:[{label:"Játékmenet Beállítások",icon:'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg>',children:[{path:"/gamification/point-rules",label:"Pontszabályok",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>'},{path:"/gamification/levels",label:"Szintek",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6" /></svg>'},{path:"/gamification/badges",label:"Kitüntetések",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z" /></svg>'}]},{label:"Események & Szezonok",icon:'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" /></svg>',children:[{path:"/gamification/seasons",label:"Szezonok",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>'},{path:"/gamification/competitions",label:"Versenyek",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 100 4 2 2 0 000-4z" /></svg>'}]},{label:"Felhasználói Adatok",icon:'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z" /></svg>',children:[{path:"/gamification/users",label:"Statisztikák",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" /></svg>'},{path:"/gamification/leaderboard",label:"Ranglista",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" /></svg>'},{path:"/gamification/ledger",label:"Pontnapló",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" /></svg>'}]},{path:"/gamification",label:"Gamification HQ",icon:'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" /></svg>'},{path:"/gamification/config",label:"Rendszer Konfig",icon:'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg>'},{path:"/gamification/parameters",label:"Rendszerparaméterek",icon:'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" /></svg>'}]},{title:"Rendszer",items:[{path:"/permissions",label:"Jogosultságok",icon:'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" /></svg>'},{label:"Rendszernaplók",icon:'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>',children:[{path:"/",label:"Rendszernaplók",icon:'<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>'}]}]}],_=M(()=>o.path==="/"?"Dashboard":o.path.startsWith("/permissions")?"Jogosultság Kezelés":o.path.startsWith("/garages")?"Garázsok":o.path.startsWith("/persons")?"Személyek":o.path.startsWith("/users")?"Felhasználók":o.path.startsWith("/logs")?"Rendszernaplók":o.path.startsWith("/packages")?"Csomagok":o.path.startsWith("/providers")?o.path==="/providers/pending"?"Jóváhagyásra váró szolgáltatók":o.path.startsWith("/providers/")?"Szolgáltató részletek":"Szolgáltatók":o.path.startsWith("/gamification")?o.path==="/gamification"?"Gamification HQ":o.path==="/gamification/point-rules"?"Pontszabályok":o.path==="/gamification/levels"?"Szintek":o.path==="/gamification/badges"?"Kitüntetések":o.path==="/gamification/seasons"?"Szezonok":o.path==="/gamification/competitions"?"Versenyek":o.path==="/gamification/users"?"Gamification Felhasználók":o.path.startsWith("/gamification/users/")?"Felhasználó Gamification":o.path==="/gamification/leaderboard"?"Ranglista":o.path==="/gamification/config"?"Rendszer Konfig":o.path==="/gamification/parameters"?"Rendszerparaméterek":o.path==="/gamification/ledger"?"Pontnapló":"Gamification":"Admin Panel");function a(i){return i==="/"?o.path==="/":o.path.startsWith(i)}function c(i){return i.children?i.children.some(t=>a(t.path)):!1}function p(i){g.value.has(i.label)?g.value.delete(i.label):g.value.add(i.label)}function $(){d.logout(),k.value=!1,S.push("/login")}function A(i){z.value&&!z.value.contains(i.target)&&(k.value=!1)}return K(()=>{document.addEventListener("click",A),x.fetchRegions().then(()=>{d.user?.region_code&&x.setActiveRegion(d.user.region_code)})}),N(()=>{document.removeEventListener("click",A)}),(i,t)=>{const y=I,D=re;return n(),l("div",de,[r.value?(n(),l("div",{key:0,class:"fixed inset-0 bg-black/50 z-20 lg:hidden",onClick:t[0]||(t[0]=f=>r.value=!1)})):H("",!0),e("aside",{class:v(["fixed lg:static inset-y-0 left-0 z-30 flex flex-col bg-slate-800 border-r border-slate-700 transition-all duration-300 ease-in-out overflow-hidden",r.value||!s.value?"w-52":"w-20"])},[R(y,{to:"/",class:"flex items-center h-16 px-4 border-b border-slate-700 overflow-hidden hover:bg-slate-700/50 transition"},{default:j(()=>[e("div",ce,[t[8]||(t[8]=e("img",{src:ie,class:"h-8 w-auto flex-shrink-0",alt:"SF Logo"},null,-1)),e("div",{class:v(["transition-all duration-300 ease-in-out overflow-hidden whitespace-nowrap",r.value||!s.value?"opacity-100 max-w-[200px]":"opacity-0 max-w-0"])},[...t[7]||(t[7]=[e("div",{class:"text-sm font-bold text-white leading-tight"},"Service Finder",-1),e("div",{class:"text-[10px] font-semibold uppercase tracking-wider text-indigo-400 leading-tight"},"Admin",-1)])],2)])]),_:1}),e("button",{class:"hidden lg:flex items-center justify-center h-10 mx-2 mt-2 rounded-lg text-slate-400 hover:text-white hover:bg-slate-700 transition flex-shrink-0",onClick:t[1]||(t[1]=f=>s.value=!s.value)},[(n(),l("svg",{class:v(["w-5 h-5 transition-transform duration-300",{"rotate-180":s.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[9]||(t[9]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 19l-7-7 7-7m8 14l-7-7 7-7"},null,-1)])],2))]),e("nav",ue,[(n(),l(b,null,B(V,f=>(n(),l(b,{key:f.title},[F(e("div",{class:"px-3 py-1 text-xs font-semibold uppercase tracking-wider text-slate-500 whitespace-nowrap overflow-hidden"},h(f.title),513),[[G,r.value||!s.value]]),(n(!0),l(b,null,B(f.items,u=>(n(),l(b,{key:u.label},[u.children?(n(),l("div",he,[e("button",{class:v(["flex items-center w-full gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition",c(u)?"bg-indigo-600/20 text-indigo-300":"text-slate-300 hover:bg-slate-700 hover:text-white"]),onClick:m=>p(u)},[e("span",{class:"flex-shrink-0 w-5 h-5",innerHTML:u.icon},null,8,pe),e("span",{class:v(["flex-1 text-left whitespace-nowrap overflow-hidden transition-all duration-300 ease-in-out",r.value||!s.value?"opacity-100 max-w-[200px]":"opacity-0 max-w-0"])},h(u.label),3),(n(),l("svg",{class:v(["w-4 h-4 transition-all duration-300 ease-in-out flex-shrink-0",{"rotate-90":g.value.has(u.label),"opacity-100":r.value||!s.value,"opacity-0":s.value&&!r.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[10]||(t[10]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2))],10,ve),F(e("div",ke,[(n(!0),l(b,null,B(u.children,m=>(n(),E(y,{key:m.path,to:m.path,class:v(["flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition",a(m.path)?"bg-indigo-600 text-white":"text-slate-400 hover:bg-slate-700 hover:text-white"]),onClick:t[2]||(t[2]=Re=>r.value=!1)},{default:j(()=>[e("span",{class:"flex-shrink-0 w-4 h-4",innerHTML:m.icon},null,8,ge),e("span",fe,h(m.label),1)]),_:2},1032,["to","class"]))),128))],512),[[G,g.value.has(u.label)&&(r.value||!s.value)]])])):(n(),E(y,{key:1,to:u.path,class:v(["flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition",a(u.path)?"bg-indigo-600 text-white":"text-slate-300 hover:bg-slate-700 hover:text-white"]),onClick:t[3]||(t[3]=m=>r.value=!1)},{default:j(()=>[e("span",{class:"flex-shrink-0 w-5 h-5",innerHTML:u.icon},null,8,me),e("span",{class:v(["whitespace-nowrap overflow-hidden transition-all duration-300 ease-in-out",r.value||!s.value?"opacity-100 max-w-[200px]":"opacity-0 max-w-0"])},h(u.label),3)]),_:2},1032,["to","class"]))],64))),128))],64))),64))]),e("div",we,[e("div",{class:v(["text-xs text-slate-500 whitespace-nowrap transition-all duration-300 ease-in-out",r.value||!s.value?"opacity-100 max-w-[200px]":"opacity-0 max-w-0"])}," ServiceFinder v2.0 ",2)])],2),e("div",xe,[e("header",be,[e("div",ze,[e("div",Me,[e("button",{class:"lg:hidden p-2 rounded-lg text-slate-400 hover:text-white hover:bg-slate-700 transition",onClick:t[4]||(t[4]=f=>r.value=!0)},[...t[11]||(t[11]=[e("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})],-1)])]),e("h1",Ce,h(_.value),1)]),e("div",_e,[R(D),e("div",{class:"relative",ref_key:"dropdownRef",ref:z},[e("button",{class:"flex items-center gap-2 p-1.5 rounded-lg hover:bg-slate-700 transition",onClick:t[5]||(t[5]=f=>k.value=!k.value)},[e("div",ye,h(L.value),1),e("span",je,h(C.value),1),t[12]||(t[12]=e("svg",{class:"w-4 h-4 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1))]),k.value?(n(),l("div",Be,[e("div",He,[e("p",Se,h(C.value),1),e("p",Le,h(W(d).userRole==="SUPERADMIN"?"Super Administrator":W(d).userRole||"Administrator"),1)]),R(y,{to:"/profile",class:"flex items-center gap-3 px-4 py-2.5 text-sm text-slate-300 hover:bg-slate-700 hover:text-white transition",onClick:t[6]||(t[6]=f=>k.value=!1)},{default:j(()=>[...t[13]||(t[13]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})],-1),P(" Profile Settings ",-1)])]),_:1}),e("button",{class:"flex items-center gap-3 w-full px-4 py-2.5 text-sm text-red-400 hover:bg-slate-700 hover:text-red-300 transition",onClick:$},[...t[14]||(t[14]=[e("svg",{class:"w-4 h-4",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),P(" Sign Out ",-1)])])])):H("",!0)],512)])])]),e("main",Ve,[Z(i.$slots,"default")])])])}}});export{Ge as default};
|