import{r as i,h as l}from"./p-dfbe004d.js";import{o as s}from"./p-d63f2554.js";import{h as o}from"./p-afcbd440.js";import{i as t,g as e}from"./p-e05449ea.js";import{_ as n}from"./p-8415f806.js";import"./p-fd56940f.js";import{f as r}from"./p-c742e4c6.js";import"./p-9a7a47e8.js";const d=class{constructor(l){i(this,l)}render(){var i,s;return this.loading?l("sc-line-item",null,l("sc-skeleton",{style:{width:"50px",height:"50px","--border-radius":"0"},slot:"image"}),l("sc-skeleton",{slot:"title",style:{width:"120px",display:"inline-block"}}),l("sc-skeleton",{slot:"description",style:{width:"60px",display:"inline-block"}}),l("sc-skeleton",{style:{width:"120px",display:"inline-block"},slot:"price"}),l("sc-skeleton",{style:{width:"60px",display:"inline-block"},slot:"price-description"})):l("div",{class:{"confirmation-summary":!0}},l("div",{class:"line-items",part:"line-items"},null===(s=null===(i=this.order)||void 0===i?void 0:i.line_items)||void 0===s?void 0:s.data.map((i=>{var s,e,n,r,d,a,c;return l("div",{class:"line-item"},l("sc-product-line-item",{key:i.id,imageUrl:null===(e=null===(s=null==i?void 0:i.price)||void 0===s?void 0:s.product)||void 0===e?void 0:e.image_url,name:`${null===(r=null===(n=null==i?void 0:i.price)||void 0===n?void 0:n.product)||void 0===r?void 0:r.name}`,editable:!1,removable:!1,quantity:i.quantity,fees:null===(d=null==i?void 0:i.fees)||void 0===d?void 0:d.data,amount:null!==i.ad_hoc_amount?i.ad_hoc_amount:i.subtotal_amount,currency:null===(a=this.order)||void 0===a?void 0:a.currency,trialDurationDays:null===(c=null==i?void 0:i.price)||void 0===c?void 0:c.trial_duration_days,interval:t(null==i?void 0:i.price,{showOnce:o(this.order)})}))}))))}};s(d,["order","busy","loading","empty"],!1),d.style=":host{display:block}.line-items{display:grid;gap:var(--sc-spacing-small)}.line-item{display:grid;gap:var(--sc-spacing-small)}.fee__description{opacity:0.75}";const a=class{constructor(l){i(this,l)}renderDiscountLine(){var i,s,o,t,r,d,a,c,v,u,p,m,y,h,f;if(!(null===(o=null===(s=null===(i=this.order)||void 0===i?void 0:i.discount)||void 0===s?void 0:s.promotion)||void 0===o?void 0:o.code))return null;let g="";return(null===(r=null===(t=this.order)||void 0===t?void 0:t.discount)||void 0===r?void 0:r.coupon)&&(g=e(null===(a=null===(d=this.order)||void 0===d?void 0:d.discount)||void 0===a?void 0:a.coupon)),l("sc-line-item",{style:{marginTop:"var(--sc-spacing-small)"}},l("span",{slot:"description"},n("Discount","surecart"),l("br",null),(null===(u=null===(v=null===(c=this.order)||void 0===c?void 0:c.discount)||void 0===v?void 0:v.promotion)||void 0===u?void 0:u.code)&&l("sc-tag",{type:"success",size:"small"},null===(y=null===(m=null===(p=this.order)||void 0===p?void 0:p.discount)||void 0===m?void 0:m.promotion)||void 0===y?void 0:y.code)),g&&l("span",{class:"coupon-human-discount",slot:"price-description"},"(",g,")"),l("sc-format-number",{slot:"price",type:"currency",currency:null===(h=this.order)||void 0===h?void 0:h.currency,value:-(null===(f=this.order)||void 0===f?void 0:f.discount_amount)}))}render(){var i,s,o,t,e,d,a;return l("div",{class:{"line-item-totals":!0}},l("sc-line-item-total",{order:this.order,total:"subtotal"},l("span",{slot:"description"},n("Subtotal","surecart"))),this.renderDiscountLine(),!!(null===(i=this.order)||void 0===i?void 0:i.bump_amount)&&l("sc-line-item",{style:{marginTop:"var(--sc-spacing-small)"}},l("span",{slot:"description"},n("Bundle Discount","surecart")),l("sc-format-number",{slot:"price",type:"currency",currency:null===(s=this.order)||void 0===s?void 0:s.currency,value:null===(o=this.order)||void 0===o?void 0:o.bump_amount})),!!(null===(t=this.order)||void 0===t?void 0:t.tax_amount)&&l("sc-line-item",{style:{marginTop:"var(--sc-spacing-small)"}},l("span",{slot:"description"},r(null===(e=this.order)||void 0===e?void 0:e.tax_label)," ",`(${this.order.tax_percent}%)`),l("sc-format-number",{slot:"price",type:"currency",currency:null===(d=this.order)||void 0===d?void 0:d.currency,value:null===(a=this.order)||void 0===a?void 0:a.tax_amount})),l("sc-divider",{style:{"--spacing":"var(--sc-spacing-small)"}}),l("sc-line-item-total",{order:this.order,size:"large","show-currency":!0},l("span",{slot:"description"},n("Total","surecart"))))}};s(a,["order","busy","loading","empty"],!1),a.style=":host{display:block}";export{d as sc_order_confirmation_line_items,a as sc_order_confirmation_totals}