import{a as D}from"./apiFront-DLFQuF_5.js";import{_ as S,a as B,r as R,ad as T,E as w,e as i,o as u,g as h,c as e,w as t,v as E,i as p,t as f,F as Y,h as K,j as M,aD as N,aE as V,n as j,cq as q,az as U,a5 as z,a6 as A,W as L,f as P}from"./app-DGDivIsO.js";import{D as W}from"./DashboardSidebar-QQZ5mZdm.js";import{O as $}from"./OrderTable-kvzPIOed.js";import"./index-C2QBqMxH.js";import"./HomeOutlined-DHkcngqC.js";import"./ShoppingOutlined-BFKX0RTd.js";import"./SettingOutlined-F4vTp2uH.js";import"./LogoutOutlined-iYhoqHWJ.js";import"./PaymentStatus-DFh8-zEw.js";import"./OrderDetails-DKtopJws.js";import"./cart-C-GPgQf0.js";import"./filter-_TPdNMe8.js";const G={components:{DashboardSidebar:W,OrderTable:$},setup(){const{addEditRequestFront:o}=D(),{orderStatus:r}=B(),_=R([]),a=T({order_status_type:"all",dates:[]}),b="YYYY-MM-DD";w(()=>{c()});const c=()=>{o({url:"front/self/orders",data:a,success:s=>{_.value=s.orders}})};return{myOrders:_,filters:a,orderStatus:r,fetchOrders:c,dateFormat:b}}},H={class:"mt-30 mb-30"},I={class:"table-responsive"};function J(o,r,_,a,b,c){const m=i("router-link"),s=N,y=V,v=i("dashboard-sidebar"),l=j,O=q,k=U,d=E,g=z,x=A,C=i("OrderTable"),F=L;return u(),h("div",H,[e(d,{type:"flex",justify:"center"},{default:t(()=>[e(l,{span:20},{default:t(()=>[e(y,null,{default:t(()=>[e(s,null,{default:t(()=>[e(m,{to:{name:"front.homepage"}},{default:t(()=>[p(f(o.$t("front.home")),1)]),_:1})]),_:1}),e(s,null,{default:t(()=>[e(m,{to:{name:"front.dashboard"}},{default:t(()=>[p(f(o.$t("front.dashboard")),1)]),_:1})]),_:1}),e(s,null,{default:t(()=>[p(f(o.$t("front.my_orders")),1)]),_:1})]),_:1}),e(d,{gutter:[30,30],class:"mt-30"},{default:t(()=>[e(l,{xs:24,sm:24,md:24,lg:6,xl:6},{default:t(()=>[e(v)]),_:1}),e(l,{xs:24,sm:24,md:24,lg:18,xl:18},{default:t(()=>[e(F,{title:null,bordered:!1,style:{borderRadius:"10px"},class:"dashboard-container"},{default:t(()=>[e(d,null,{default:t(()=>[e(l,{span:24},{default:t(()=>[e(k,{title:o.$t("front.order_history"),style:{"padding-left":"0px"}},{extra:t(()=>[e(O,{value:a.filters.dates,"onUpdate:value":r[0]||(r[0]=n=>a.filters.dates=n),placeholder:[o.$t("common.start_date"),o.$t("common.end_date")],style:{width:"100%"},onChange:a.fetchOrders,valueFormat:a.dateFormat},null,8,["value","placeholder","onChange","valueFormat"])]),_:1},8,["title"])]),_:1})]),_:1}),e(d,null,{default:t(()=>[e(l,{span:24},{default:t(()=>[e(x,{activeKey:a.filters.order_status_type,"onUpdate:activeKey":r[1]||(r[1]=n=>a.filters.order_status_type=n),onChange:a.fetchOrders},{default:t(()=>[e(g,{key:"all",tab:"All Orders"}),(u(!0),h(Y,null,K(a.orderStatus,n=>(u(),P(g,{key:n.key,tab:`${n.value}`},null,8,["tab"]))),128))]),_:1},8,["activeKey","onChange"]),M("div",I,[e(C,{data:a.myOrders,onReloadOrders:a.fetchOrders},null,8,["data","onReloadOrders"])])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])}const ce=S(G,[["render",J]]);export{ce as default};
