"use strict";(self.webpackChunkwebpackWcBlocksStylingJsonp=self.webpackChunkwebpackWcBlocksStylingJsonp||[]).push([[3982],{66777:(t,e,c)=>{c.d(e,{w:()=>s});var o=c(47594),n=c(47143),r=c(1614),a=c(66379);const s=()=>{const{isCalculating:t,isBeforeProcessing:e,isProcessing:c,isAfterProcessing:s,isComplete:l,hasError:i}=(0,n.useSelect)((t=>{const e=t(o.CHECKOUT_STORE_KEY);return{isCalculating:e.isCalculating(),isBeforeProcessing:e.isBeforeProcessing(),isProcessing:e.isProcessing(),isAfterProcessing:e.isAfterProcessing(),isComplete:e.isComplete(),hasError:e.hasError()}})),{activePaymentMethod:u,isExpressPaymentMethodActive:m}=(0,n.useSelect)((t=>{const e=t(o.PAYMENT_STORE_KEY);return{activePaymentMethod:e.getActivePaymentMethod(),isExpressPaymentMethodActive:e.isExpressPaymentMethodActive()}})),{onSubmit:p}=(0,r.E)(),{paymentMethods:d={}}=(0,a.m)(),b=c||s||e,h=l&&!i;return{paymentMethodButtonLabel:(d[u]||{}).placeOrderButtonLabel,onSubmit:p,isCalculating:t,isDisabled:c||m,waitingForProcessing:b,waitingForRedirect:h}}},51145:(t,e,c)=>{c.r(e),c.d(e,{default:()=>P});var o=c(41616),n=c(51609),r=c(70851),a=c(15703),s=c(4298),l=c(66777),i=c(88605),u=c(7104),m=c(22900),p=c(74845),d=c(70910),b=c(14656);const h=({label:t,fullWidth:e=!1,showPrice:c=!1,priceSeparator:o="·"})=>{const{onSubmit:a,isCalculating:s,isDisabled:h,waitingForProcessing:k,waitingForRedirect:w}=(0,l.w)(),{cartTotals:g}=(0,i.V)(),E=(0,d.getCurrencyFromPriceResponse)(g),_=(0,n.createElement)("div",{"aria-hidden":k||w,className:(0,r.A)("wc-block-components-checkout-place-order-button__text",{"wc-block-components-checkout-place-order-button__text--visually-hidden":k||w})},t,c&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("style",null,`.wp-block-woocommerce-checkout-actions-block {\n\t\t\t\t\t\t\t.wc-block-components-checkout-place-order-button__separator {\n\t\t\t\t\t\t\t\t&::after {\n\t\t\t\t\t\t\t\t\tcontent: "${o}";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}`),(0,n.createElement)("div",{className:"wc-block-components-checkout-place-order-button__separator"}),(0,n.createElement)("div",{className:"wc-block-components-checkout-place-order-button__price"},(0,n.createElement)(b.FormattedMonetaryAmount,{value:g.total_price,currency:E}))));return(0,n.createElement)(p.A,{className:(0,r.A)("wc-block-components-checkout-place-order-button",{"wc-block-components-checkout-place-order-button--full-width":e},{"wc-blocks-components-button--loading":k}),onClick:a,disabled:s||h||k||w,showSpinner:k},k&&(0,n.createElement)(b.Spinner,null),w&&(0,n.createElement)(u.A,{icon:m.A}),_)};var k=c(72379),w=c(71e3),g=c(83291);c(88780);var E=c(76577),_=c(60602);const P=(0,o.withFilteredAttributes)({...E.A,..._.attributes})((({cartPageId:t,showReturnToCart:e,className:c,placeOrderButtonLabel:o,returnToCartButtonLabel:i,priceSeparator:u})=>{const{paymentMethodButtonLabel:m}=(0,l.w)(),p=(0,w.applyCheckoutFilter)({filterName:"placeOrderButtonLabel",defaultValue:m||o||g.H}),d=(null==c?void 0:c.includes("is-style-with-price"))||!1;return(0,n.createElement)("div",{className:(0,r.A)("wc-block-checkout__actions",c)},(0,n.createElement)(b.StoreNoticesContainer,{context:k.tG.CHECKOUT_ACTIONS}),(0,n.createElement)("div",{className:"wc-block-checkout__actions_row"},e&&(0,n.createElement)(s.A,{href:(0,a.getSetting)("page-"+t,!1)},i),d&&(0,n.createElement)("style",null,`.wp-block-woocommerce-checkout-actions-block {\n\t\t\t\t\t\t.wc-block-components-checkout-place-order-button__separator {\n\t\t\t\t\t\t\t&::after {\n\t\t\t\t\t\t\t\tcontent: "${u}";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}`),(0,n.createElement)(h,{label:p,fullWidth:!e,showPrice:d,priceSeparator:u})))}))}}]);