({4736(){var t=this;$(function(){var e=$(".table-language");e.on("click",".delete-locale-button",function(t){t.preventDefault(),$(".delete-crud-entry").data("url",$(t.currentTarget).data("url")),$(".modal-confirm-delete").modal("show")}),$(document).on("click",".delete-crud-entry",function(a){a.preventDefault(),$(".modal-confirm-delete").modal("hide");var o=$(a.currentTarget).data("url");Botble.showButtonLoading($(t)),$httpClient.make().delete(o).then(function(t){var a=t.data;a.data&&(e.find("i[data-locale=".concat(a.data,"]")).unwrap(),$(".tooltip").remove()),e.find('.delete-locale-button[data-url="'.concat(o,'"]')).closest("tr").remove(),Botble.showSuccess(a.message)}).finally(function(){Botble.hideButtonLoading($(t))})}),$(document).on("submit",".add-locale-form",function(t){t.preventDefault(),t.stopPropagation();var a=$(this),o=a.find('button[type="submit"]');Botble.showButtonLoading(o),$httpClient.make().postForm(a.prop("action"),new FormData(a[0])).then(function(t){var a=t.data;Botble.showSuccess(a.message),e.load("".concat(window.location.href," .table-language > *"))}).finally(function(){Botble.hideButtonLoading(o)})})})}})[4736].call({});