(()=>{"use strict";const e=window.React,t=window.wc.wcBlocksRegistry,n=(window.wp.htmlEntities,(0,window.wc.wcSettings.getSetting)("wizit_data",{})),i=()=>{const e=document.getElementsByClassName("wizit-pop-outer");e&&e.length>0&&(e[0].style.display="block")},l=()=>{var t,l;const a=Number(n.orderTotal),o=a/4,m=Number(null!==(t=n.pluginSettings.merchant_maximum_amount)&&void 0!==t?t:0),r=Number(null!==(l=n.pluginSettings.merchant_minimum_amount)&&void 0!==l?l:0),c={orderTotal:a.toFixed(2),installments:o.toFixed(2),maxAmount:m.toFixed(2),minAmount:r.toFixed(2)};return(0,e.createElement)("div",null,(0,e.createElement)("p",{class:"content"},"Wizitcard - Interest free credit card up to $1,000 limit with a simple monthly fee."),(0,e.createElement)("div",{class:"clear"}),(0,e.createElement)("p",{class:"content"},"Payments starting from $",c.minAmount," per week.  ",(0,e.createElement)("a",{target:"_blank",class:"wizit-popup-open",onClick:i},"learn more")))},a={name:"wizit",label:(0,e.createElement)((t=>(0,e.createElement)("div",{style:{width:"100%"}},(0,e.createElement)("span",{style:{float:"left",display:"inline-block",width:"50%"}},"Wizit"),(0,e.createElement)("span",{style:{float:"right",display:"inline-block",width:"50%",textAlign:"right"}},(0,e.createElement)("img",{style:{paddingRight:"15px"},src:"https://www.wizit.money/img/plugin/wizit.png"})))),null),content:(0,e.createElement)(l,null),edit:(0,e.createElement)(l,null),canMakePayment:()=>!0,ariaLabel:"Wizit",supports:{features:n.supports}};(0,t.registerPaymentMethod)(a);const{registerPlugin:o}=window.wp.plugins,{ExperimentalOrderMeta:m}=window.wc.blocksCheckout,r=({cart:t,extensions:l,context:a})=>{var o,m;const r=Number(n.orderTotal),c=r/4,s=Number(null!==(o=n.pluginSettings.merchant_maximum_amount)&&void 0!==o?o:0),u=Number(null!==(m=n.pluginSettings.merchant_minimum_amount)&&void 0!==m?m:0),p={orderTotal:r.toFixed(2),installments:c.toFixed(2),maxAmount:s.toFixed(2),minAmount:u.toFixed(2)};return"woocommerce/cart"===a?(0,e.createElement)("div",{class:"wc-block-components-totals-wrapper"},(0,e.createElement)("p",null,(0,e.createElement)("img",{style:{width:"40px",height:"20px",display:"inline-block"},class:"wizit-payment-logo",src:"https://www.wizit.money/img/plugin/wizit.png"}),"  Payments starting from $",p.minAmount," per week.     ",(0,e.createElement)("a",{target:"_blank",class:"wizit-popup-open",onClick:i},"learn more"))):(0,e.createElement)("div",null)};o("wizit-woo-checkout-block",{render:()=>"yes"===n.pluginSettings.payment_info_on_cart?(0,e.createElement)(m,null,(0,e.createElement)(r,null)):(0,e.createElement)(m,null),scope:"woocommerce-checkout"})})();