import{useI18nStore as e}from"@gem-sdk/core";import{useDynamicProduct as t}from"./useDynamicProduct.js";import{useRecurringSubtotal as i}from"./useRecurringSubtotal.js";import{useProductPriceBreakdown as o}from"./useProductPriceBreakdown.js";import{useSubscriptionSellingType as l}from"./useSubscriptionSellingType.js";let u=(u,a)=>{let{isDynamicProduct:s,dynamicPrice:n,dynamicDiscount:r,isEnableDynamicDiscount:p}=t(),{t:b}=e(),c=i(),{isSubscription:d}=l(),{subTotalMoneyFormatted:h,offerDiscountTotal:L,discountMoneyFormatted:m,totalMoneyFormatted:g}=o();return{getMoneyLines:()=>{let e=[];return!1!==u.isShowSubTotalLabel&&e.push({title:a.subTotalLabel,money:s?n:h,uniqueId:"subTotalLabel"}),!1!==u.isShowDiscountLabel&&e.push({title:a.discountLabel,money:s&&r&&p?`${r.value}%`:L>0?m:"No discount",uniqueId:"discountLabel"}),!1!==u.isShowShippingLabel&&e.push({title:a.shippingLabel,uniqueId:"shippingLabel",tooltip:{content:"Shipping fee will be calculated on real offer page",width:"23em"}}),!1!==u.isShowTaxesLabel&&e.push({title:a.taxesLabel,uniqueId:"taxesLabel",tooltip:{content:"Taxes will be calculated on real offer page",width:"20em"}}),!1!==u.isShowTotalLabel&&e.push({title:a.totalLabel,money:s?n:g,uniqueId:"totalLabel"}),a?.isShowRecurringTotalLabel!==!1&&c&&d&&e.push({title:b("Recurring subtotal"),money:c,uniqueId:"recurringTotalLabel",subTitle:b("Doesn't include shipping, tax or duties")}),e}}};export{u as useGetMoneyLines};
