import{getDecimalAmount as e}from"../../../utils/amount-util.js";function t(e,t){if(null==e)return{};var n,o,r,i={};if("undefined"!=typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(e),r=0;r<n.length;r++)o=n[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);return i}if(i=function(e,t){if(null==e)return{};var n,o,r={},i=Object.getOwnPropertyNames(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),r=0;r<n.length;r++)o=n[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);return i}const n=n=>{const{countryCode:o,companyName:r,amount:i}=n,p=t(n,["countryCode","companyName","amount"]),a=(t=>String(e(t.value,t.currency)))(i);return o||console.warn("Apple Pay - Make sure to set the countryCode in the AdyenCheckout configuration or in the Checkout Session creation"),{countryCode:o,currencyCode:i.currency,total:{label:p.totalPriceLabel,amount:a,type:p.totalPriceStatus},lineItems:p.lineItems,shippingContactEditingMode:p.shippingContactEditingMode,shippingMethods:p.shippingMethods,shippingType:p.shippingType,recurringPaymentRequest:p.recurringPaymentRequest,merchantCapabilities:p.merchantCapabilities,supportedCountries:p.supportedCountries,supportedNetworks:p.supportedNetworks,requiredShippingContactFields:p.requiredShippingContactFields,requiredBillingContactFields:p.requiredBillingContactFields,billingContact:p.billingContact,shippingContact:p.shippingContact,applicationData:p.applicationData,couponCode:p.couponCode,supportsCouponCode:p.supportsCouponCode}};export{n as preparePaymentRequest};
//# sourceMappingURL=payment-request.js.map
