1import{f as g,g as m,ao as d,Q as k,c as v,k as C,l as s,a,b as o,w as n,p as N,o as w,n as U,t as i,d as c,y as I}from"#entry";import{_ as B}from"./C8uurULH.js";import{_ as P}from"./DGe0SKWz.js";import{f as S}from"./D7R-VBN2.js";import{u as V}from"./KvgRY-IA.js";import{s as j}from"./B_iXexET.js";import"./p3McDCCa.js";import"./CYfRGOk9.js";import"./BAMVNYKa.js";import"./CLT0g60e.js";import"./CVnqMxe5.js";import"./0f7dhzqm.js";const O={key:0},T={class:"flex items-center justify-center gap-2 text-base"},$={class:"flex items-center justify-center gap-2 text-base"},q={class:"flex items-center justify-center gap-2 text-base"},z={class:"flex items-center justify-center gap-2 text-base"},D={class:"font-bold text-black"},X=g({__name:"index",setup(R){const u=m(()=>[{key:"code",label:"Code",icon:"i-ri-bookmark-line"},{key:"totalPrice",label:"Total Price",icon:"i-ri-money-dollar-circle-line"},{key:"numberOfItems",label:"Number of Items",icon:"i-ri-file-list-line"},{key:"actions"}]),p=m(()=>(_.value?.rows??[]).map(t=>({...t,totalPrice:S(t.totalPrice),status:j(t.status),numberOfItems:t.shoppingCart.length}))),{data:_,pending:b}=V("/api/orders",{query:{query:m(()=>d().value?.email)}},"$_9cJBYIyH4"),f=d(),x=k();return(t,r)=>{const l=I,y=U,h=B;return("_isNil"in t?t._isNil:s(N))(s(f))?C("",!0):(w(),v("div",O,[r[1]||(r[1]=a("h2",{class:"text-2xl md:text-4xl font-bold my-6"}," My Orders ",-1)),o(h,{columns:s(u),rows:s(p),ui:{td:{base:"text-center py-6"},th:{base:"bg-pampas first:rounded-tl-xl last:rounded-tr-xl first:rounded-bl-xl last:rounded-br-xl"},divide:""},loading:s(b),onSelect:r[0]||(r[0]=e=>s(x).push(`/orders/${e.id}`))},{"code-header":n(({column:e})=>[a("div",T,[o(l,{name:e.icon,dynamic:""},null,8,["name"]),c(" "+i(e.label),1)])]),"status-header":n(({column:e})=>[a("div",$,[o(l,{name:e.icon,dynamic:""},null,8,["name"]),c(" "+i(e.label),1)])]),"numberOfItems-header":n(({column:e})=>[a("div",q,[o(l,{name:e.icon,dynamic:""},null,8,["name"]),c(" "+i(e.label),1)])]),"totalPrice-header":n(({column:e})=>[a("div",z,[o(l,{name:e.icon,dynamic:""},null,8,["name"]),c(" "+i(e.label),1)])]),"code-data":n(({row:e})=>[a("p",D,i(e.code),1)]),"actions-data":n(({row:e})=>[o(y,{variant:"outline",color:"gray",label:"View Details",size:"xl",to:("trailingSlashUrl"in t?t.trailingSlashUrl:s(P))(`/orders/${e.id}`),ui:{size:{xl:"text-sm md:text-base"}}},null,8,["to"])]),_:1},8,["columns","rows","loading"])]))}}});
1export{X as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.