const n="/ ",r=(n,r)=>(null==r?void 0:r.value)&&(null==r?void 0:r.currency)?n.amount(r.value,r.currency,{currencyDisplay:r.currencyDisplay||"symbol"}):"",t=n=>{const r=n.get("payAmountFormat"),t=r.indexOf("%@");return t>=0&&r.substring(t+2).trim().length>0},u=(n,u,c)=>{const o=r(n,u);if(!o)return n.get("payButton");if(c&&t(n)){const r=e(n,c);return n.get("payAmountFormat").replace("%@",`${o}${r}`)}return n.get("payAmountFormat").replace("%@",o)},e=(n,r)=>{const t=r&&(null==r?void 0:r.value)&&(null==r?void 0:r.currency)?n.amount(r.value,r.currency,{currencyDisplay:r.currencyDisplay||"symbol"}):"";return`${t.length?"/ ":""}${t}`};function c(n,r,t,e,c,o){return r||(c?u(n,c):e?n.get("confirmPreauthorization"):u(n,t,o))}function o(n,r,u,c,o){return c||o||!u||!r||t(n)?null:e(n,r)}export{n as PAY_BTN_DIVIDER,r as amountLabel,c as createButtonLabel,o as createSecondaryLabel,u as payAmountLabel};
//# sourceMappingURL=utils.js.map
