import{r as e,h as d}from"./p-e97fde0a.js";import"./p-acf63e23.js";import{s as c}from"./p-86fd1a31.js";import"./p-863940e9.js";import"./p-03631502.js";import"./p-13f5e4e1.js";import"./p-3f6362a4.js";import"./p-ec182234.js";import"./p-9dbc54d6.js";import"./p-93127aa7.js";import"./p-830ab1a3.js";import"./p-6e785215.js";import"./p-0df04773.js";import"./p-6135d661.js";import"./p-401e165e.js";import"./p-d3366af3.js";import"./p-1f60f497.js";const o=":host{display:block}";const i=o;const r=class{constructor(d){e(this,d)}renderAmountDue(){var e,o,i;return c.amount_due>0?d("sc-format-number",{type:"currency",value:c.amount_due,currency:((o=(e=c===null||c===void 0?void 0:c.line_item)===null||e===void 0?void 0:e.price)===null||o===void 0?void 0:o.currency)||"usd"}):!!((i=c===null||c===void 0?void 0:c.line_item)===null||i===void 0?void 0:i.trial_amount)?wp.i18n.__("Trial","surecart"):wp.i18n.__("Free","surecart")}render(){var e,o,i,r,l,s,a,t,u,n,p,v,b,f,m,y;return d("sc-summary",{key:"58bfcc83bef2fa0859b07ca1fd0764dfa7da86e0","open-text":"Total","closed-text":"Total",collapsible:true,collapsed:true},!!((e=c.line_item)===null||e===void 0?void 0:e.id)&&d("span",{key:"c83179a08867ef76b2525424f0c6df5091d439ae",slot:"price"},this.renderAmountDue()),d("sc-divider",{key:"0253e6ac48bbcc9361d5c56871328cd2e9ec7c11"}),d("sc-line-item",{key:"c7576de55de8900ba557c4d69981724f4a6b563e"},d("span",{key:"72c30a7126295c5dc080e3274fad548bd96050f2",slot:"description"},wp.i18n.__("Subtotal","surecart")),d("sc-format-number",{key:"0571dc0478c465e92c02bf7125a8ec20216e6047",slot:"price",type:"currency",value:(o=c.line_item)===null||o===void 0?void 0:o.subtotal_amount,currency:((r=(i=c===null||c===void 0?void 0:c.line_item)===null||i===void 0?void 0:i.price)===null||r===void 0?void 0:r.currency)||"usd"})),(((s=(l=c===null||c===void 0?void 0:c.line_item)===null||l===void 0?void 0:l.fees)===null||s===void 0?void 0:s.data)||[]).filter((e=>e.fee_type==="upsell")).map((e=>{var o,i;return d("sc-line-item",null,d("span",{slot:"description"},e.description," ",`(${wp.i18n.__("one time","surecart")})`),d("sc-format-number",{slot:"price",type:"currency",value:e.amount,currency:((i=(o=c===null||c===void 0?void 0:c.line_item)===null||o===void 0?void 0:o.price)===null||i===void 0?void 0:i.currency)||"usd"}))})),!!((a=c.line_item)===null||a===void 0?void 0:a.tax_amount)&&d("sc-line-item",{key:"8646b4379ef71cbdb996db499142a5327bb0e70b"},d("span",{key:"73cb232e41135abab6ae6fab02b0f259eadcd4dc",slot:"description"},wp.i18n.__("Tax","surecart")),d("sc-format-number",{key:"82eb739fd7707241e18fbbba9423415b3b812b03",slot:"price",type:"currency",value:(t=c.line_item)===null||t===void 0?void 0:t.tax_amount,currency:((n=(u=c===null||c===void 0?void 0:c.line_item)===null||u===void 0?void 0:u.price)===null||n===void 0?void 0:n.currency)||"usd"})),d("sc-divider",{key:"a3bfcde26e7c96e5d282afaf64c4cd9ca473e8f1"}),d("sc-line-item",{key:"c7edd66ede456739b772b7b810390c7af4da0003",style:{"--price-size":"var(--sc-font-size-x-large)"}},d("span",{key:"dc7bcdd6d12d60895e7e18eb76b1c021e7eb9013",slot:"title"},wp.i18n.__("Total","surecart")),d("sc-format-number",{key:"d647e69d7def1e36a5f440c688abdd4b4f115c5f",slot:"price",type:"currency",value:(p=c.line_item)===null||p===void 0?void 0:p.total_amount,currency:((b=(v=c===null||c===void 0?void 0:c.line_item)===null||v===void 0?void 0:v.price)===null||b===void 0?void 0:b.currency)||"usd"})),c.amount_due!==((f=c.line_item)===null||f===void 0?void 0:f.total_amount)&&d("sc-line-item",{key:"2723b501aac48b33ef2e06cfaf81c1c14165814b",style:{"--price-size":"var(--sc-font-size-x-large)"}},d("span",{key:"5014156e3114e8c75379f2d7902fa29fe89b564e",slot:"title"},wp.i18n.__("Amount Due","surecart")),d("span",{key:"e236f360567e07fc27203dac803b4fd0ba6ac40c",slot:"price"},d("sc-format-number",{key:"dc3e547771e76adfbb77063bb071fe68750e2e39",slot:"price",type:"currency",value:c.amount_due,currency:((y=(m=c===null||c===void 0?void 0:c.line_item)===null||m===void 0?void 0:m.price)===null||y===void 0?void 0:y.currency)||"usd"}))))}};r.style=i;export{r as sc_upsell_totals};
//# sourceMappingURL=p-732877b8.entry.js.map