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