import{m as _,b as $,_ as v,f as e,o as u,v as p,w as s,g as b,F as D,k as w,h as t,i as d,A as B,p as U,t as h}from"./app-ff872a97.js";const x={computed:{..._("app",["generalSettings","getUnseenProductQuerries"]),..._("affiliate",["isAffiliatedUser"]),..._("auth",["isAuthenticated"]),routes(){return this.getMenuItems().sort((o,a)=>o.order-a.order)}},methods:{...$("affiliate",["fetchAffiliatedUser"]),getMenuItems(){return[{label:this.$i18n.t("dashboard"),order:10,icon:"las la-th-large",to:"DeliveryBoyDashboard"},{label:this.$i18n.t("assigned_delivery"),order:20,icon:"las la-tasks",to:"AssignedDeliveries"},{label:this.$i18n.t("picked_up_delivery"),order:30,icon:"las la-luggage-cart",to:"PickedUpDeliveries"},{label:this.$i18n.t("on_the_way_delivery"),order:40,icon:"las la-truck-moving",to:"OnTheWayDeliveries"},{label:this.$i18n.t("pending_delivery"),order:50,icon:"las la-clock",to:"PendingDeliveries"},{label:this.$i18n.t("completed_delivery"),order:60,icon:"las la-check-circle",to:"CompletedDeliveries"},{label:this.$i18n.t("cancelled_delivery"),order:70,icon:"las la-times-circle",to:"CancelDeliveries"},{label:this.$i18n.t("collections_list"),order:80,icon:"las la-file-invoice-dollar",to:"CollectionsList"},{label:this.$i18n.t("earnings_list"),order:90,icon:"las la-money-bill-wave",to:"EarningsList"}]}},created(){this.getMenuItems()}};function C(o,a,f,g,y,m){const l=e("v-icon"),r=e("v-list-item-title"),i=e("v-list-item"),c=e("v-list");return u(),p(c,{color:"primary"},{default:s(()=>[(u(!0),b(D,null,w(m.routes,(n,k)=>(u(),p(i,{key:k,to:{name:n.to},class:"mb-0"},{default:s(()=>[t(l,{class:"me-4 d-flex align-center"},{default:s(()=>[d("i",{class:B([n.icon,"fs-17"])},null,2)]),_:2},1024),t(i,null,{default:s(()=>[t(r,{class:"fw-500 fs-14"},{default:s(()=>[U(h(n.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["to"]))),128))]),_:1})}const A=v(x,[["render",C]]),M={components:{DeliveryBoyMenu:A},data:()=>({}),computed:{..._("auth",["currentUser"])}},L={class:"pa-5 text-center border-bottom"},E=["src"],F={class:"fs-22 fw-500 mb-0 lh-1"},I={class:"text-truncate opacity-60"};function N(o,a,f,g,y,m){const l=e("v-avatar"),r=e("DeliveryBoyMenu"),i=e("v-list"),c=e("v-card");return u(),p(c,{class:"border-end shadow-none rounded-0"},{default:s(()=>[d("div",L,[t(l,{size:"160",class:"mb-5"},{default:s(()=>[d("img",{src:o.currentUser.avatar,onError:a[0]||(a[0]=n=>o.imageFallback(n)),class:"border border-4 user-dashboard-profile-image"},null,40,E)]),_:1}),d("h4",F,h(o.currentUser.name),1),d("div",I,h(o.currentUser.email),1)]),t(i,{nav:"",class:"px-0 user-side-nav"},{default:s(()=>[t(r)]),_:1})]),_:1})}const P=v(M,[["render",N]]),V={components:{sidemenu:P},computed:{..._("auth",["currentUser"])},methods:{...$(["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:"DeliveryBoyLogin"}).catch(()=>{}))}},z={class:""};function S(o,a,f,g,y,m){const l=e("sidemenu"),r=e("v-col"),i=e("router-view"),c=e("v-row"),n=e("v-container");return u(),b("div",z,[t(n,null,{default:s(()=>[t(c,{"no-gutters":""},{default:s(()=>[t(r,{lg:"3",class:"d-none d-lg-block"},{default:s(()=>[t(l)]),_:1}),t(r,{cols:"12",lg:"9",class:"pt-0"},{default:s(()=>[t(i)]),_:1})]),_:1})]),_:1})])}const W=v(V,[["render",S]]);export{W as default};
