"use strict";(globalThis.webpackChunksibs_woo_stg=globalThis.webpackChunksibs_woo_stg||[]).push([[110],{110(e,t,s){s.r(t);var n=s(703),o=s(537),c=s(723),r=s(83),a=s(87),l=s(848);const i="sibs_stg_cc",p=`${i}_data`,_=(0,n.getSetting)(p)||{},d=()=>{if(!_)return null;const e=(0,o.decodeEntities)(_?.title||""),t=_?.logos||[];return(0,l.jsxs)("div",{className:"wc-block-components-payment-method-label wc-block-components-payment-method-label--with-icon",children:[t.map((e,t)=>(0,l.jsx)("img",{src:e,style:{display:"inline",paddingRight:"5px"},alt:""},t)),(0,l.jsx)("span",{children:e})]})},m=({eventRegistration:e,emitResponse:t})=>{const[s,n]=(0,a.useState)(!1),c=(0,o.decodeEntities)(_?.description??""),r=_?.checkoutLabel;return(0,a.useEffect)(()=>{const t=e.onPaymentSetup(()=>!0);return()=>t()},[s,r]),(0,a.useEffect)(()=>{const n=e.onPaymentProcessing(()=>(console.log("checked: "+s),{type:t.responseTypes.SUCCESS,meta:{paymentMethodData:{sibs_stg_oneclick_customer_acceptor:s}}}));return()=>n()},[s]),(0,l.jsxs)("div",{children:[c&&(0,l.jsx)("div",{className:"sibs-cc-description",dangerouslySetInnerHTML:{__html:c},style:{marginBottom:"10px"}}),r&&(0,l.jsxs)("div",{style:{display:"flex",alignItems:"flex-start"},children:[(0,l.jsx)("input",{type:"checkbox",className:"wc-block-components-checkbox__input",onChange:e=>n(e.target.checked),checked:s,id:"sibs_stg_oneclick_customer_acceptor",style:{marginRight:"5px"}}),(0,l.jsx)("label",{htmlFor:"sibs_stg_oneclick_customer_acceptor",className:"wc-block-components-checkbox__label",children:(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:r}})})]})]})};(0,r.registerPaymentMethod)({name:i,label:(0,l.jsx)(d,{}),ariaLabel:(0,c.__)("SIBS payment method",_?.translation),canMakePayment:()=>!0,content:(0,l.jsx)(m,{}),edit:(0,l.jsx)(m,{}),supports:{features:_?.supports??[]}})},20(e,t,s){var n=s(609),o=Symbol.for("react.element"),c=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),r=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,s){var n,l={},i=null,p=null;for(n in void 0!==s&&(i=""+s),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(p=t.ref),t)c.call(t,n)&&!a.hasOwnProperty(n)&&(l[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===l[n]&&(l[n]=t[n]);return{$$typeof:o,type:e,key:i,ref:p,props:l,_owner:r.current}}t.jsx=l,t.jsxs=l},848(e,t,s){e.exports=s(20)}}]);