3 lines
No EOL
2.1 KiB
JavaScript
3 lines
No EOL
2.1 KiB
JavaScript
"use strict";(self.webpackChunkwebpackWcBlocksCartCheckoutFrontendJsonp=self.webpackChunkwebpackWcBlocksCartCheckoutFrontendJsonp||[]).push([[4654],{4183:(e,o,t)=>{t.r(o),t.d(o,{default:()=>w});var c=t(1609),r=t(7723),a=t(851),n=t(6087),s=t(4656),i=t(6777),l=t(9491),d=t(7143),m=t(7594),u=t(812);const _=u.gu?`<a href="${u.gu}" target="_blank">${(0,r.__)("Terms and Conditions","woocommerce")}</a>`:(0,r.__)("Terms and Conditions","woocommerce"),h=u.pk?`<a href="${u.pk}" target="_blank">${(0,r.__)("Privacy Policy","woocommerce")}</a>`:(0,r.__)("Privacy Policy","woocommerce"),k=(0,r.sprintf)(/* translators: %1$s terms page link, %2$s privacy page link. */ /* translators: %1$s terms page link, %2$s privacy page link. */
|
|
(0,r.__)("By proceeding with your purchase you agree to our %1$s and %2$s","woocommerce"),_,h),p=(0,r.sprintf)(/* translators: %1$s terms page link, %2$s privacy page link. */ /* translators: %1$s terms page link, %2$s privacy page link. */
|
|
(0,r.__)("You must accept our %1$s and %2$s to continue with your purchase.","woocommerce"),_,h),w=(0,l.withInstanceId)((({text:e,checkbox:o,instanceId:t,className:l,showSeparator:u})=>{const[_,h]=(0,n.useState)(!1),{isDisabled:w}=(0,i.w)(),b="terms-and-conditions-"+t,{setValidationErrors:E,clearValidationError:g}=(0,d.useDispatch)(m.VALIDATION_STORE_KEY),f=(0,d.useSelect)((e=>e(m.VALIDATION_STORE_KEY).getValidationError(b))),C=!(null==f||!f.message||null!=f&&f.hidden);return(0,n.useEffect)((()=>{if(o)return _?g(b):E({[b]:{message:(0,r.__)("Please read and accept the terms and conditions.","woocommerce"),hidden:!0}}),()=>{g(b)}}),[o,_,b,g,E]),(0,c.createElement)("div",{className:(0,a.A)("wc-block-checkout__terms",{"wc-block-checkout__terms--disabled":w,"wc-block-checkout__terms--with-separator":"false"!==u&&!1!==u},l)},o?(0,c.createElement)(c.Fragment,null,(0,c.createElement)(s.CheckboxControl,{id:"terms-and-conditions",checked:_,onChange:()=>h((e=>!e)),hasError:C,disabled:w},(0,c.createElement)("span",{dangerouslySetInnerHTML:{__html:e||p}}))):(0,c.createElement)("span",{dangerouslySetInnerHTML:{__html:e||k}}))}))}}]); |