(()=>{var e,n,t,r,i;(n=(e=jQuery)(".js-currency-adder")).length&&(t=n.find("select"),r=n.find("input"),i=function(e){return e.on("click",(function(){e.parents(".js-p24-multiplier-box").remove()})),e},e(".js-p24-multiplier-box input[type=button]").each((function(n,t){i(e(t))})),r.on("click",(function(){var n,r,a,u,c;r=(n=e(".js-p24-multiplier-box").last()).find("input[type=number]").attr("name"),a=t.val(),r=r.replace(/\[[^\]]*\]$/,"["+a+"]"),(u=n.clone()).find("input[type=number]").attr("name",r).val(1).prop("disabled",!1),(c=u.find("input[type=button]")).css("display","unset"),i(c),u.find("label").text(a),n.after(u)}))),function(e){var n=e("select[name=p24_order_currency]");n.on("change",(function(){var n=e(this),t=e("input[name=post_ID]").val(),r=n.val();e.ajax({url:ajaxurl,method:"POST",type:"POST",data:{action:"p24_mc_admin_order_edit",order_id:t,currency_code:r}})})),n.trigger("change")}(jQuery)})();
//# sourceMappingURL=p24_multi_currency_admin_script.js.map