(()=>{"use strict";var t={n:e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{default:()=>i});const r=window.wcPPCP.utils,n=window.wp.apiFetch;var a=t.n(n);const o=window.wcPPCP.actions;var s=t.n(o);const i=new class{constructor(t){this.data=t,this.actions=new(s())}async createOrder(t,e={}){return a()({method:"POST",url:(0,r.getRestRoute)("order/pay"),data:{payment_method:t,...e,...this.data}}).then(t=>t)}needsShipping(){return this.actions.applyFilters("order_needs_shipping",!1,this)}getCurrency(){return this.data.currency}getTotal(){return this.data.total||0}getTotalCents(){return parseInt(this.data.totalCents||0)}getLineItems(){return this.data.lineItems||[]}}((0,r.getSetting)("order"));(this.wcPPCP=this.wcPPCP||{}).order=e})();
//# sourceMappingURL=order.js.map