(()=>{"use strict";const e=window.React,t=window.wp.i18n,n=window.wc.wcBlocksRegistry,a=window.wp.htmlEntities,l=window.wc.wcSettings,r=window.wp.hooks;inpsydeGateways.forEach(o=>{const s=(0,l.getSetting)(`${o}_data`,{}),c=`${o}_checkout_fields`,i=`${o}_saved_token_fields`,d=`${o}_payment_method_icons`,m=(0,t.__)("Syde Payment Gateway","syde-payment-gateway"),u=(0,a.decodeEntities)(s.title)||m,p=t=>{const[n,l]=(0,e.useState)([]);if((0,e.useEffect)(()=>{l(r.defaultHooks.applyFilters(c,[]))},[]),!Array.isArray(n)||!n.length){const t=()=>(0,a.decodeEntities)(s.description||"");return(0,e.createElement)(t,null)}return(0,e.createElement)(e.Fragment,null,n.map(n=>(0,e.createElement)(n,{...t})))},w={name:o,label:(0,e.createElement)(t=>{const{PaymentMethodLabel:n,PaymentMethodIcons:a}=t.components;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n,{text:u}),(0,e.createElement)(a,{icons:r.defaultHooks.applyFilters(d,s.icons)}))},null),content:(0,e.createElement)(p,null),edit:(0,e.createElement)(p,null),savedTokenComponent:(0,e.createElement)(t=>{const[n,a]=(0,e.useState)([]);return(0,e.useEffect)(()=>{a(r.defaultHooks.applyFilters(i,[]))},[]),Array.isArray(n)&&n.length?(0,e.createElement)(e.Fragment,null,n.map(n=>(0,e.createElement)(n,{...t}))):null},null),icons:s.icons,canMakePayment:()=>!0,ariaLabel:u,supports:{features:s.supports}};s.placeOrderButtonLabel&&(w.placeOrderButtonLabel=s.placeOrderButtonLabel),(0,n.registerPaymentMethod)(w)})})();