"use strict";(globalThis.webpackChunkwebpackWcBlocksStylingJsonp=globalThis.webpackChunkwebpackWcBlocksStylingJsonp||[]).push([[4654],{64908:(e,s,t)=>{t.d(s,{w:()=>r});var o=t(47594),c=t(47143),n=t(79530),a=t(28814);const r=()=>{const{isCalculating:e,isBeforeProcessing:s,isProcessing:t,isAfterProcessing:r,isComplete:i,hasError:l}=(0,c.useSelect)((e=>{const s=e(o.checkoutStore);return{isCalculating:s.isCalculating(),isBeforeProcessing:s.isBeforeProcessing(),isProcessing:s.isProcessing(),isAfterProcessing:s.isAfterProcessing(),isComplete:s.isComplete(),hasError:s.hasError()}})),{activePaymentMethod:d,isExpressPaymentMethodActive:h}=(0,c.useSelect)((e=>{const s=e(o.paymentStore);return{activePaymentMethod:s.getActivePaymentMethod(),isExpressPaymentMethodActive:s.isExpressPaymentMethodActive()}})),{onSubmit:m}=(0,n.E)(),{paymentMethods:u={}}=(0,a.m)(),g=t||r||s,b=i&&!l;return{paymentMethodButtonLabel:(u[d]||{}).placeOrderButtonLabel,onSubmit:m,isCalculating:e,isDisabled:t||h,waitingForProcessing:g,waitingForRedirect:b}}},44725:(e,s,t)=>{t.r(s),t.d(s,{default:()=>g});var o=t(27723),c=t(4921),n=t(86087),a=t(14656),r=t(64908),i=t(29491),l=t(47143),d=t(47594),h=t(38288),m=t(98889),u=t(10790);const g=(0,i.withInstanceId)((({text:e,checkbox:s,instanceId:t,className:i,showSeparator:g})=>{const[b,p]=(0,n.useState)(!1),{isDisabled:k}=(0,r.w)(),w="terms-and-conditions-"+t,{setValidationErrors:P,clearValidationError:_}=(0,l.useDispatch)(d.validationStore),x=(0,l.useSelect)((e=>e(d.validationStore).getValidationError(w))),S=!(!x?.message||x?.hidden);return(0,n.useEffect)((()=>{if(s)return b?_(w):P({[w]:{message:(0,o.__)("Please read and accept the terms and conditions.","woocommerce"),hidden:!0}}),()=>{_(w)}}),[s,b,w,_,P]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(m.VM,{}),(0,u.jsx)("div",{className:(0,c.A)("wc-block-checkout__terms",{"wc-block-checkout__terms--disabled":k,"wc-block-checkout__terms--with-separator":"false"!==g&&!1!==g},i),children:s?(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(a.CheckboxControl,{id:"terms-and-conditions",checked:b,onChange:()=>p((e=>!e)),hasError:S,disabled:k,children:(0,u.jsx)("span",{className:"wc-block-components-checkbox__label",dangerouslySetInnerHTML:{__html:e||h.R}})})}):(0,u.jsx)("span",{className:"wc-block-components-checkbox__label",dangerouslySetInnerHTML:{__html:e||h.G}})})]})}))}}]);