import{p as D,r as E,H as y,c as B,a as o,b as e,e as n,d as l,A as C,m as b,g as i,o as F,x as m,n as p,t as r}from"./entry.126c240b.js";import{u as A,I as c}from"./iconify.f8f64a59.js";const M={class:"layout-topbar"},T=o("span",{class:"font-semibold"},"Dashboard UCY",-1),j={class:"block rounded-lg cursor-pointer mt-2 bg-white border border-slate-200 pt-2"},H=o("div",{class:"bg-[#DBEAFE] rounded-lg flex items-center justify-center w-[40px] h-[40px]"},[o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",viewBox:"0 0 24 24"},[o("path",{fill:"#3267E3",d:"M7.5 6.5C7.5 8.981 9.519 11 12 11s4.5-2.019 4.5-4.5S14.481 2 12 2S7.5 4.019 7.5 6.5M20 21h1v-1c0-3.859-3.141-7-7-7h-4c-3.86 0-7 3.141-7 7v1z"})])],-1),L={class:"block ml-3"},S={class:"font-semibold"},$=o("div",{class:"bg-[#FFF4F2] rounded-lg flex items-center justify-center w-[40px] h-[40px]"},[o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",viewBox:"0 0 24 24"},[o("path",{fill:"none",stroke:"#CB3A31","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8m4-9l-4-4m4 4l-4 4m4-4H9"})])],-1),z=o("div",{class:"block ml-3"},[o("div",{class:"font-semibold"},"Logout"),o("div",null,"Keluar dari Dashboard")],-1),I=[$,z],P=o("span",null,"Profile",-1),U={class:"block rounded-lg cursor-pointer mt-2 bg-white border border-slate-200 pt-2"},K=o("div",{class:"bg-[#DBEAFE] rounded-lg flex items-center justify-center w-[40px] h-[40px]"},[o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",viewBox:"0 0 24 24"},[o("path",{fill:"#3267E3",d:"M7.5 6.5C7.5 8.981 9.519 11 12 11s4.5-2.019 4.5-4.5S14.481 2 12 2S7.5 4.019 7.5 6.5M20 21h1v-1c0-3.859-3.141-7-7-7h-4c-3.86 0-7 3.141-7 7v1z"})])],-1),N={class:"block ml-3"},R={class:"font-semibold"},V=o("div",{class:"bg-[#FFF4F2] rounded-lg flex items-center justify-center w-[40px] h-[40px]"},[o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",viewBox:"0 0 24 24"},[o("path",{fill:"none",stroke:"#CB3A31","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8m4-9l-4-4m4 4l-4 4m4-4H9"})])],-1),O=o("div",{class:"block ml-3"},[o("div",{class:"font-semibold"},"Logout"),o("div",null,"Keluar dari Dashboard")],-1),Y=[V,O],q={data(){return{data:{}}},async mounted(){await this.loadData()},methods:{async loadData(){const d=await $fetch(this.$config.public.API_PUBLIC_URL+"/api/admin",{headers:{Authorization:"Bearer "+b().token}});this.data.name=d.name,this.data.email=d.email}}},Q=Object.assign(q,{__name:"AppTopbar",setup(d){const v=D(),{onMenuToggle:g}=A(),_=E(!1),f=y(()=>({"layout-topbar-menu-mobile-active":_.value}));function u(){b().token=null,v.push("/auth/login")}return(t,s)=>{const w=i("v-img"),k=i("router-link"),x=i("Button"),h=i("v-menu");return F(),B("div",M,[o("button",{class:"p-link layout-menu-button layout-topbar-button",onClick:s[0]||(s[0]=a=>n(g)())},[e(n(c),{icon:"heroicons-solid:menu-alt-1",width:"26"})]),e(k,{to:"/dashboard",class:"flex layout-topbar-logo items-center"},{default:l(()=>[o("div",null,[e(w,{width:"50",height:"35",src:"/logo.png",alt:"logo"})]),T]),_:1}),e(h,null,{activator:l(({props:a})=>[e(x,m(a,{class:"p-link layout-topbar-menu-button layout-topbar-button"}),{default:l(()=>[e(n(c),{icon:"heroicons-solid:user",width:"28"})]),_:2},1040)]),default:l(()=>[o("div",j,[o("div",{onClick:s[1]||(s[1]=a=>("navigateTo"in t?t.navigateTo:n(p))("/dashboard/profile")),class:"mb-2 pt-4 flex px-7 border-b hover:bg-[#EDEDED] border-slate-300 pb-3"},[H,o("div",L,[o("div",S,r(t.data.name),1),o("div",null,r(t.data.email),1)])]),o("div",{onClick:u,class:"mb-2 mt-2 px-7 pt-3 hover:bg-[#EDEDED] flex pb-3"},I)])]),_:1}),o("div",{class:C(["layout-topbar-menu",f.value])},[e(h,{"open-on-hover":""},{activator:l(({props:a})=>[o("button",m(a,{class:"p-link layout-topbar-button"}),[e(n(c),{icon:"heroicons-solid:user",width:"28"}),P],16)]),default:l(()=>[o("div",U,[o("div",{onClick:s[2]||(s[2]=a=>("navigateTo"in t?t.navigateTo:n(p))("/dashboard/profile")),class:"mb-2 pt-4 flex px-7 border-b hover:bg-[#EDEDED] border-slate-300 pb-3"},[K,o("div",N,[o("div",R,r(t.data.name),1),o("div",null,r(t.data.email),1)])]),o("div",{onClick:u,class:"mb-2 mt-2 px-7 pt-3 hover:bg-[#EDEDED] flex pb-3"},Y)])]),_:1})],2)])}}});export{Q as default};
