import{c5 as $,m as d,_ as m,f as e,o as p,v as b,w as s,i as a,h as t,t as l,b as U,g as w}from"./app-e7b909c6.js";const k={components:{UserMenu:$},data:()=>({}),computed:{...d("auth",["currentUser"])}},y={class:"pa-5 text-center border-bottom"},x=["src"],B={class:"fs-22 fw-500 mb-0 lh-1"},C={class:"text-truncate opacity-60"};function M(o,r,h,v,f,g){const c=e("v-avatar"),n=e("UserMenu"),i=e("v-list"),u=e("v-card");return p(),b(u,{class:"border-end shadow-none rounded-0"},{default:s(()=>[a("div",y,[t(c,{size:"160",class:"mb-5"},{default:s(()=>[a("img",{src:o.currentUser.avatar,onError:r[0]||(r[0]=_=>o.imageFallback(_)),class:"border border-4 user-dashboard-profile-image"},null,40,x)]),_:1}),a("h4",B,l(o.currentUser.name),1),a("div",C,l(o.currentUser.email),1)]),t(i,{nav:"",class:"px-0 user-side-nav"},{default:s(()=>[t(n)]),_:1})]),_:1})}const E=m(k,[["render",M]]),L={components:{sidemenu:E},computed:{...d("auth",["currentUser"])},methods:{...U(["auth/logout"]),async logout(){await this.call_api("get","auth/logout"),this["auth/logout"](),this.resetCart(),this.resetWishlist(),this.$router.push({name:"Home"}).catch(()=>{})}},created(){this.currentUser.user_type!="customer"&&(this.logout(),this.snack({message:this.$i18n.t("You are not permitted to access this!"),color:"red"}),this.$router.push({name:"Login"}).catch(()=>{}))}},N={class:""};function V(o,r,h,v,f,g){const c=e("sidemenu"),n=e("v-col"),i=e("router-view"),u=e("v-row"),_=e("v-container");return p(),w("div",N,[t(_,null,{default:s(()=>[t(u,{"no-gutters":""},{default:s(()=>[t(n,{lg:"3",class:"d-none d-lg-block"},{default:s(()=>[t(c)]),_:1}),t(n,{cols:"12",lg:"9",class:"pt-0"},{default:s(()=>[t(i)]),_:1})]),_:1})]),_:1})])}const A=m(L,[["render",V]]);export{A as default};
