1import{j as e,c as I,C as E,e as T,t as _,l as O,bl as D,a$ as S,B as P}from"./entry.client-BF1tJIhu.js";import{L as B}from"./LoadingResults-BL-vfXql.js";import{S as L}from"./Transition-BTIyssUe.js";import{S as M,P as A}from"./SidebarLayout-CYs8a6ti.js";import{E as C}from"./EventCard-BKeAkzjZ.js";import{a as R}from"./dates-D-wmKt_5.js";import{f as k}from"./money-BPeR89cN.js";import"./ResponsiveImage-CSPuaRWh.js";import"./RouteFlipped-B4cBB0q3.js";function $(r){return e.jsxs("div",{className:"type-body-s-roman flex gap-2 items-center",children:[r.type==="member"&&e.jsx("div",{children:r.name?`${r.name} (Member)`:`Member ${r.memberNumber}`}),r.type==="guest"&&e.jsx("div",{children:r.name})]})}function V(r){var y,h;const s=r.order,l=q(),i=s.attendees||[],m=[{label:"Order ID",value:s.databaseId},{label:"Order Date",value:s.date?R(s.date):null},{label:"Billing Email",value:(y=s.billing)==null?void 0:y.email},{label:"Order Status",value:s.status?e.jsx(E,{children:s.status}):null}].filter(a=>a.value),n=T.useMemo(()=>{var b,p,j,v,f,N,g;const a=[];let o="";if((b=s.lineItems)!=null&&b.nodes)for(const[u,t]of s.lineItems.nodes.entries()){let d=(p=t.product)==null?void 0:p.node.name;if(((j=t.product)==null?void 0:j.node.__typename)==="VariableProduct"){d!==o&&(o=d,a.push(e.jsx("div",{className:"flex justify-between items-center py-3 border-b type-title-xs-medium border-grey-light",children:d},"heading"+u))),d=(v=t.variation)==null?void 0:v.node.description;const w=i.filter(x=>{var c;return x.priceId===((c=t.variation)==null?void 0:c.node.databaseId)});a.push(e.jsxs("div",{className:"py-2 border-b border-grey-light",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"stack-y-1",children:[d&&e.jsx("div",{className:"type-title-xs-roman",children:d}),e.jsx("div",{className:"type-body-s-roman text-grey-mid",children:t.quantity==1?"1 ticket":`${t.quantity} tickets`})]}),e.jsx("div",{className:"type-body-s-roman pl-2",children:k(t.subtotal)})]}),w.length>0&&e.jsxs("div",{className:"stack-y-1 mt-3",children:[e.jsx("div",{className:"type-body-s-roman",children:"Attendees:"}),e.jsx("ul",{className:"list-disc pl-[20px] my-0 type-body-s-roman text-grey-mid",children:w.map((x,c)=>e.jsx("li",{children:e.jsx($,{...x})},c))})]})]},u))}else a.push(e.jsxs("div",{className:"flex justify-between items-center py-4 border-b border-grey-light",children:[e.jsxs("div",{className:"stack-y-1",children:[d&&e.jsx("div",{className:"type-title-xs-medium",children:d}),((f=t.product)==null?void 0:f.node.__typename)==="SubscriptionProduct"&&e.jsx("div",{className:"type-body-s-roman text-grey-dark",children:(N=t.subtotal)!=null&&N.match(/^[0-9]/)?k(t.subtotal):t.subtotal})]}),((g=t.product)==null?void 0:g.node.__typename)==="SubscriptionProduct"?e.jsx("div",{className:"type-body-s-roman hidden @[300px]:block",children:t.subtotal}):e.jsx("div",{className:"type-body-s-roman pl-2",children:t.subtotal})]},u))}return a},[(h=s.lineItems)==null?void 0:h.nodes]);return e.jsxs("div",{className:"stack-y-7",children:[e.jsx("div",{className:"flex flex-col",children:m.map((a,o)=>e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"w-1/2 flex-1",children:a.label}),e.jsx("div",{className:"w-1/2 flex-1",children:a.value})]},o))}),s.event&&e.jsxs("div",{children:[e.jsx("h4",{className:l.heading(),children:"Event Details"}),e.jsx(C,{...s.event,mode:"row",ctaLabel:"Details"})]}),e.jsxs("div",{children:[e.jsx("h4",{className:_(l.heading(),"border-b mb-2"),children:"Order Summary"}),n,e.jsxs("div",{className:"border-b border-grey-light py-2 flex justify-between",children:[e.jsx("div",{className:"type-body-s-roman",children:"Subtotal"}),e.jsx("div",{className:"type-body-s-roman",children:e.jsx("div",{children:s.subtotal})})]}),!!s.totalTax&&e.jsxs("div",{className:"border-b border-grey-light py-2 flex justify-between",children:[e.jsx("div",{className:"type-body-s-roman",children:"GST (10%)"}),e.jsx("div",{className:"type-body-s-roman",children:e.jsx("div",{children:s.totalTax})})]}),e.jsxs("div",{className:"border-b border-grey-light py-4 flex justify-between",children:[e.jsx("div",{className:"type-title-xs-medium",children:"Total"}),e.jsx("div",{className:"text-right",children:e.jsx("div",{className:"type-title-xs-medium",children:s.total})})]})]})]})}const q=I({slots:{heading:"type-title-s-medium pb-2"}});function G(r){var n;const l=O().pathname.replace(/^\/order\//,""),i=D({id:l});if(i.isLoading)return e.jsx(B,{});if(i.isError)return e.jsx(S,{title:"An error occurred",message:i.error});if(!((n=i.data)!=null&&n.orderById))return e.jsx(S,{title:"We couldn't find your order",message:i.error,button:e.jsx(P,{href:"/contact",children:"Contact Us"})});const m=i.data.orderById;return e.jsx(L,{children:e.jsx("div",{className:"pb-10",children:e.jsxs(M,{children:[e.jsx(A,{title:"Thank y
1ou for your purchase",subtitle:"Order Summary"}),e.jsx(V,{order:m})]})})})}G.displayName="View(checkout/order)";export{G as default}; 2//# sourceMappingURL=order-WXUszKQ9.js.map
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.