(e=>{"use strict";const t={init:()=>{let e=t;e.toggleMode(),e.toggleDelayPeriodField(),e.togglePaymentRequestFields(),e.toggleCrossBorderTransferFields(),e.toggleIntervalField(),e.element("testmode").change(e.toggleMode),e.element("disburse_mode").change(e.toggleDelayPeriodField),e.element("payment_request").change(e.togglePaymentRequestFields),e.element("cross_border_transfer").change(e.toggleCrossBorderTransferFields),e.element("announcement_to_sellers").change(e.toggleIntervalField)},toggleMode:()=>{["test_publishable_key","test_secret_key","test_webhook_key"].forEach((e=>{t.element("testmode").is(":checked")?(t.element(e).closest("tr").show(),t.element("webhook_key").closest("tr").hide()):(t.element(e).closest("tr").hide(),t.element("webhook_key").closest("tr").show())}))},togglePaymentRequestFields:()=>{["type","theme","size","locations"].forEach((e=>{t.element("payment_request").is(":checked")?t.element(e,"payment_request_button").closest("tr").show():t.element(e,"payment_request_button").closest("tr").hide()}))},toggleCrossBorderTransferFields:()=>{["restricted_countries","disconnect_restricted_vendors"].forEach((e=>{t.element("cross_border_transfer").is(":checked")?t.element(e).closest("tr").show():t.element(e).closest("tr").hide()})),["disconnect_connected_vendors"].forEach((e=>{t.element("cross_border_transfer").is(":checked")?t.element(e).closest("tr").hide():t.element(e).closest("tr").show()}))},toggleDelayPeriodField:()=>{"DELAYED"===t.element("disburse_mode").val()?t.element("disbursement_delay_period").closest("tr").show():t.element("disbursement_delay_period").closest("tr").hide()},toggleIntervalField:()=>{t.element("announcement_to_sellers").is(":checked")?t.element("notice_interval").closest("tr").show():t.element("notice_interval").closest("tr").hide()},element:(t,s=!1)=>(s&&s.length&&(t=`${s}_${t}`),e(`#woocommerce_dokan_stripe_express_${t}`))};e(document).ready(t.init)})(jQuery);