(()=>{"use strict";const e=window.React,o=window.wp.i18n,c=window.wc.wcSettings,{registerCheckoutBlock:t}=wc.blocksCheckout,a=(0,c.getSetting)("mycredwoo_data",{});t({metadata:{name:"mycred-woocommerce/mycred-woo-checkout-block",version:"1.0.0",title:"myCred WooCommerce",category:"woocommerce",parent:["woocommerce/checkout-totals-block"],attributes:{lock:{type:"object",default:{remove:!0,move:!0}}},textdomain:"mycred-woocommerce"},component:({extensions:c})=>{const{mycredwoo:t}=c,r=""!=t.mycred_woo_balance_label,l="cart"!==a.show_total&&""!==a.show_total;var m="no"===t.payment_gateway?"low-balance":"",d=""==t?"wrapper-disabled":"";return(0,e.createElement)("div",{class:`mycred-woo-fields-wrapper ${d}`},l&&(0,e.createElement)("div",{class:"mycred-woo-order-total"},(0,e.createElement)("span",{class:"mycred-woo-order-total-label"},(0,o.__)(t.mycred_woo_total_label,"mycred-woocommerce")),(0,e.createElement)("span",{class:`mycred-woo-order-total-value ${m}`},t.mycred_woo_total)),r&&(0,e.createElement)("div",{class:"mycred-woo-total-credit"},(0,e.createElement)("span",{class:"mycred-woo-total-credit-label"},(0,o.__)(t.mycred_woo_balance_label,"mycred-woocommerce")),(0,e.createElement)("span",{class:"mycred-woo-total-credit-value"},t.mycred_woo_balance)))}})})();