{"version":3,"names":["scLineItemTotalCss","ScLineItemTotalStyle0","wp","i18n","__","h","slot","this","getCurrencyToDisplay","class","checkout","sprintf","_a","currency","toUpperCase","trial_display_amount","style","hasSubscription","name","amount_due_display_amount","renderConversion","full_display_amount","size","renderLineItemTitle","renderLineItemDescription","total_savings_amount","total","total_scratch_display_amount","total_display_amount"],"sources":["src/components/controllers/checkout-form/line-item-total/sc-line-item-total.scss?tag=sc-line-item-total&encapsulation=shadow","src/components/controllers/checkout-form/line-item-total/sc-line-item-total.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\nsc-line-item {\n text-align: left;\n}\n\n.line-item-total__group sc-line-item {\n margin: 4px 0px !important;\n}\n\n.scratch-price {\n text-decoration: line-through;\n color: var(--sc-color-gray-500);\n font-size: var(--sc-font-size-small);\n margin-right: var(--sc-spacing-xx-small);\n}\n\nsc-line-item::part(base) {\n grid-template-columns: max-content auto auto;\n}\n\n.total-price {\n white-space: nowrap;\n}\n\n.currency-label {\n color: var(--sc-color-gray-500);\n font-size: var(--sc-font-size-xx-small);\n margin-right: var(--sc-spacing-xx-small);\n vertical-align: middle;\n}\n\nsc-divider {\n margin: 16px 0 !important;\n}\n.conversion-description {\n color: var(--sc-color-gray-500);\n font-size: var(--sc-font-size-small);\n margin-right: var(--sc-spacing-xx-small);\n}\n","/**\n * External dependencies.\n */\nimport { Component, Fragment, h, Prop } from '@stencil/core';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies.\n */\nimport { formBusy } from '@store/form/getters';\nimport { state as checkoutState } from '@store/checkout';\nimport { Checkout } from '../../../../types';\n\n@Component({\n tag: 'sc-line-item-total',\n styleUrl: 'sc-line-item-total.scss',\n shadow: true,\n})\nexport class ScLineItemTotal {\n @Prop() total: 'total' | 'subtotal' = 'total';\n @Prop() size: 'large' | 'medium';\n @Prop() checkout: Checkout;\n\n order_key = {\n total: 'total_amount',\n subtotal: 'subtotal_amount',\n amount_due: 'amount_due',\n };\n\n hasInstallmentPlan(checkout: Checkout) {\n return checkout?.full_amount !== checkout?.subtotal_amount;\n }\n\n hasSubscription(checkout: Checkout) {\n return (checkout?.line_items?.data || []).some(\n lineItem => lineItem?.price?.recurring_interval === 'month' && !!lineItem?.price?.recurring_interval && !lineItem?.price?.recurring_period_count,\n );\n }\n\n renderLineItemTitle(checkout: Checkout) {\n if (this.total === 'total' && this.hasInstallmentPlan(checkout)) {\n return (\n \n