import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{At as t,j as n,mt as r}from"./vendor-react-N_fu9J_Y.js";import{Wt as i}from"./Storyblok-DGCBwXgG.js";import{t as a}from"./classnames-BRexu-Ot.js";import{V as o}from"./drivers-wEwLhNmR.js";var s=e=>{let{currencyCode:t,value:n}=e,r=i(),a=t===`JPY`?`ja-JP`:r;return(e=>new Intl.NumberFormat(a,{style:`currency`,currency:t}).format(e))(n)},c={priceContainer:`_priceContainer_87vaz_10`,discount:`_discount_87vaz_18`,taxText:`_taxText_87vaz_26`,taxTextDiscount:`_taxTextDiscount_87vaz_33`,priceTextModifier:`_priceTextModifier_87vaz_38`,red:`_red_87vaz_38`},l=e(n()),u=e(a()),d=t(),f={value:l.number.isRequired,isFinal:l.bool,currencyCode:l.string.isRequired,discount:l.number,showDiscount:l.bool,showTaxText:l.bool,classes:(0,l.shape)({currency:l.string,integer:l.string,decimal:l.string,fraction:l.string,priceContainerModifier:l.string,priceTextModifier:l.string})},p=e=>{let{currencyCode:t,discount:n,showDiscount:i=!0,showTaxText:a=!0,value:l}=e,f=o(c,e.classes),{t:p}=r(),m=s({currencyCode:t,value:l+n}),h=s({currencyCode:t,value:l});return(0,d.jsxs)(`div`,{className:(0,u.default)(f.priceContainer,f.priceContainerModifier),children:[n>0&&i&&(0,d.jsxs)(`div`,{className:f.discount,"data-testid":`discount`,children:[m,` `,a&&(0,d.jsxs)(`span`,{className:f.taxTextDiscount,children:[`(`,p(`catalog.taxinc`,`Tax inc`),`)`]})]}),(0,d.jsxs)(`div`,{className:f.priceTextModifier,children:[` `,h,` `,a&&(0,d.jsxs)(`span`,{className:f.taxText,children:[`(`,p(`catalog.taxinc`,`Tax inc`),`)`]})]})]})};p.propTypes=f;export{s as n,p as t};