"use strict";(self.webpackChunkwebpackWcBlocksJsonp=self.webpackChunkwebpackWcBlocksJsonp||[]).push([[8806],{65390:(e,s,t)=>{t.d(s,{P:()=>c});var n=t(94801),r=t(9818),a=t(45999),i=t(9576);const c=()=>{const{isCalculating:e,isBeforeProcessing:s,isProcessing:t,isAfterProcessing:c,isComplete:o,hasError:l}=(0,r.useSelect)((e=>{const s=e(n.CHECKOUT_STORE_KEY);return{isCalculating:s.isCalculating(),isBeforeProcessing:s.isBeforeProcessing(),isProcessing:s.isProcessing(),isAfterProcessing:s.isAfterProcessing(),isComplete:s.isComplete(),hasError:s.hasError()}})),{activePaymentMethod:d,isExpressPaymentMethodActive:u}=(0,r.useSelect)((e=>{const s=e(n.PAYMENT_STORE_KEY);return{activePaymentMethod:s.getActivePaymentMethod(),isExpressPaymentMethodActive:s.isExpressPaymentMethodActive()}})),{onSubmit:m}=(0,a.U)(),{paymentMethods:h={}}=(0,i.E)(),E=t||c||s,g=o&&!l;return{paymentMethodButtonLabel:(h[d]||{}).placeOrderButtonLabel,onSubmit:m,isCalculating:e,isDisabled:t||u,waitingForProcessing:E,waitingForRedirect:g}}},10283:(e,s,t)=>{t.r(s),t.d(s,{default:()=>h});var n=t(69307),r=t(65736),a=t(89814),i=t.n(a),c=t(33554),o=t(65390),l=t(94333),d=t(9818),u=t(94801),m=t(81065);const h=(0,l.withInstanceId)((({text:e,checkbox:s,instanceId:t,className:a})=>{const[l,h]=(0,n.useState)(!1),{isDisabled:E}=(0,o.P)(),g="terms-and-conditions-"+t,{setValidationErrors:p,clearValidationError:P}=(0,d.useDispatch)(u.VALIDATION_STORE_KEY),b=(0,d.useSelect)((e=>e(u.VALIDATION_STORE_KEY).getValidationError(g))),_=!(null==b||!b.message||null!=b&&b.hidden);return(0,n.useEffect)((()=>{if(s)return l?P(g):p({[g]:{message:(0,r.__)("Please read and accept the terms and conditions.","woocommerce"),hidden:!0}}),()=>{P(g)}}),[s,l,g,P,p]),(0,n.createElement)("div",{className:i()("wc-block-checkout__terms",{"wc-block-checkout__terms--disabled":E},a)},s?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(c.CheckboxControl,{id:"terms-and-conditions",checked:l,onChange:()=>h((e=>!e)),hasError:_,disabled:E},(0,n.createElement)("span",{dangerouslySetInnerHTML:{__html:e||m.S}}))):(0,n.createElement)("span",{dangerouslySetInnerHTML:{__html:e||m.w}}))}))}}]);