1import{r as e,j as s}from"./vendor-ui-CeH3K39y.min.js";import{s as i}from"./shopify-CJqG0VxN.min.js";import"./helpers-Bh4R2LRr.min.js";import"./components-DkOnb6VS.min.js";import"./alpine-DI9VGMhm.min.js";import"./alpine-Ag_IduAt.min.js";import"./findinstore-Bv09ZlSy.min.js";import"./helpers-B_F72D5_.min.js";import"./vendor-shopify-DGnp2FyE.min.js";import"./vendor-react-DorEuJat.min.js";import"./animations-C0iFTUlq.min.js";import"./globals-o8X60Tr9.min.js";import"./prodify-BehGtoWY.min.js";import"./vendor-utils-DjCmu9YT.min.js";const t=({settings:t})=>{const{section:n,routes:a,blocks:r}=t,[o,c]=e.useState(t.cart),[l,m]=e.useState([]);e.useEffect(()=>(async function(e){const s=await i.getShopifyProductList(e);m(s)}([...new Set(o.items.map(e=>e.product_id))]),document.addEventListener("liquid-ajax-cart:request-end",function(e){const{requestState:s,cart:i,previousCart:t,sections:n}=e.detail;c(i)}),()=>{window.removeEventListener("liquid-ajax-cart:request-end",()=>{})}),[]);const d=r.length?r.find(e=>"payment_icons"===e.type):null,p=o.original_total_price,u=o.items.reduce((e,s)=>{if(s.selling_plan_allocation){return e+(s.selling_plan_allocation.compare_at_price-s.selling_plan_allocation.price)/100*s.quantity}if(s.line_level_discount_allocations){let i=0;s.line_level_discount_allocations.forEach(e=>{i+=e.amount});return e+i/100}{const i=l.find(e=>e.id===s.product_id),t=null==i?void 0:i.compare_at_price;if(t){return e+(t-s.price)/100*s.quantity}}return e},0),h=p/100;return s.jsxs("div",{className:"cart__summary",children:[s.jsx("div",{className:"cart__summary-top"}),s.jsxs("form",{id:"cart",action:a.cart_url,method:"post",className:"cart__summary-form",children:[s.jsxs("div",{className:"cart__summary-items",children:[s.jsxs("div",{className:"cart__summary-items-item",children:[s.jsx("span",{children:"Subtotal"}),s.jsxs("span",{children:["$",h.toFixed(2)]})]}),u>0&&s.jsxs("div",{className:"cart__summary-items-item savings-pill",children:[s.jsx("span",{children:"Total Savings"}),s.jsxs("span",{children:["- $",u.toFixed(2)]})]}),s.jsxs("div",{className:"cart__summary-items-item",children:[s.jsx("span",{children:"Shipping"}),s.jsxs("div",{className:"shipping-details",children:[s.jsx("div",{children:"Calculated at checkout"}),s.jsx("div",{children:"Free for orders over $99"})]})]}),s.jsxs("div",{className:"cart__summary-items-item",children:[s.jsx("span",{children:"Total"}),s.jsxs("span",{children:["$",(o.items_subtotal_price/100).toFixed(2)]})]})]}),n.show_cart_note&&s.jsxs("div",{className:"cart_notes",children:[s.jsx("label",{htmlFor:"cart_note",children:"Cart Notes"}),s.jsx("input",{className:"cart_notes-input",type:"text",name:"cart_note",id:"cart_note",placeholder:"Enter notes for cart"})]}),s.jsx("button",{className:"button-primary",type:"submit",name:"checkout",form:"checkout",children:"Go to checkout"}),(null==d?void 0:d.settings.payment_icons)&&s.jsx("div",{className:"payment-icons",children:s.jsx("img",{src:d.settings.payment_icons,alt:"Payment icons",className:"mx-auto"})})]}),s.jsxs("div",{className:"info-area",children:[s.jsxs("div",{className:"help-section",children:[s.jsx("p",{className:"help-section-title",children:"HELP"}),s.jsxs("p",{children:["[email protected] ",s.jsx("br",{}),"Call us: +61 2 997 3787 ",s.jsx("br",{}),"Live chat 9am to 5pm Mon-Fri ",s.jsx("br",{})]})]}),s.jsxs("div",{className:"shipping-section",children:[s.jsx("p",{className:"shipping-section-title",children:"SHIPPING AND RETURN"}),s.jsxs("p",{children:["We offer free shipping on all Australian and New Zealand orders over $300 with free online exchanges and easy 14-day returns. All online orders are shipped with carbon neutral delivery. ",s.jsx("br",{}),"Prefer to pick up from store? Select your nearest store at checkout for click and collect and pick up your order same-day. ",s.jsx("br",{}),"If you are shipping outside of Australia and New Zealand, please continue to our international website to checkout."]})]})]})]})};export{t as CartSummary};
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.