"use strict";(self.webpackChunkwebpackWcBlocksStylingJsonp=self.webpackChunkwebpackWcBlocksStylingJsonp||[]).push([[4654],{66777:(e,t,s)=>{s.d(t,{w:()=>i});var n=s(47594),r=s(47143),a=s(1614),c=s(66379);const i=()=>{const{isCalculating:e,isBeforeProcessing:t,isProcessing:s,isAfterProcessing:i,isComplete:o,hasError:l}=(0,r.useSelect)((e=>{const t=e(n.CHECKOUT_STORE_KEY);return{isCalculating:t.isCalculating(),isBeforeProcessing:t.isBeforeProcessing(),isProcessing:t.isProcessing(),isAfterProcessing:t.isAfterProcessing(),isComplete:t.isComplete(),hasError:t.hasError()}})),{activePaymentMethod:d,isExpressPaymentMethodActive:m}=(0,r.useSelect)((e=>{const t=e(n.PAYMENT_STORE_KEY);return{activePaymentMethod:t.getActivePaymentMethod(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive()}})),{onSubmit:u}=(0,a.E)(),{paymentMethods:h={}}=(0,c.m)(),E=s||i||t,g=o&&!l;return{paymentMethodButtonLabel:(h[d]||{}).placeOrderButtonLabel,onSubmit:u,isCalculating:e,isDisabled:s||m,waitingForProcessing:E,waitingForRedirect:g}}},7214:(e,t,s)=>{s.r(t),s.d(t,{default:()=>h});var n=s(51609),r=s(27723),a=s(70851),c=s(86087),i=s(14656),o=s(66777),l=s(29491),d=s(47143),m=s(47594),u=s(15995);const h=(0,l.withInstanceId)((({text:e,checkbox:t,instanceId:s,className:l,showSeparator:h})=>{const[E,g]=(0,c.useState)(!1),{isDisabled:p}=(0,o.w)(),_="terms-and-conditions-"+s,{setValidationErrors:P,clearValidationError:b}=(0,d.useDispatch)(m.VALIDATION_STORE_KEY),k=(0,d.useSelect)((e=>e(m.VALIDATION_STORE_KEY).getValidationError(_))),w=!(null==k||!k.message||null!=k&&k.hidden);return(0,c.useEffect)((()=>{if(t)return E?b(_):P({[_]:{message:(0,r.__)("Please read and accept the terms and conditions.","woocommerce"),hidden:!0}}),()=>{b(_)}}),[t,E,_,b,P]),(0,n.createElement)("div",{className:(0,a.A)("wc-block-checkout__terms",{"wc-block-checkout__terms--disabled":p,"wc-block-checkout__terms--with-separator":"false"!==h&&!1!==h},l)},t?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.CheckboxControl,{id:"terms-and-conditions",checked:E,onChange:()=>g((e=>!e)),hasError:w,disabled:p},(0,n.createElement)("span",{dangerouslySetInnerHTML:{__html:e||u.R}}))):(0,n.createElement)("span",{dangerouslySetInnerHTML:{__html:e||u.G}}))}))}}]);