import"./bootstrap.esm-Bb7dPm-H.js";import{$ as a}from"./datatables-Bo82YvhT.js";/* empty css                                  */a.fn.dataTable.ext.errMode="none";a(document).on("xhr.dt",function(r,e,o,n){var i;if(n&&n.status===403){const t=((i=window.datatableTranslations)==null?void 0:i.forbidden)||"Bu işlem için yetkiniz bulunmamaktadır.";typeof window.showError=="function"?window.showError(t):typeof window.showAlert=="function"&&window.showAlert("error",t);const s=a(e.nTable).closest(".dataTables_wrapper").find(".dataTables_processing");return s.length&&s.hide(),!1}if(n&&n.status===401)return typeof window.refreshApiToken=="function"&&window.refreshApiToken().then(t=>{t&&e.ajax&&e.ajax.headers&&(e.ajax.headers.Authorization="Bearer "+t),a(e.nTable).DataTable().ajax.reload()}),!1});const u={getDefaultConfig:()=>({language:{url:`/assets/js/i18n/datatables/${document.documentElement.lang||"tr"}.json`},pageLength:25,lengthMenu:[[10,25,50,100,-1],[10,25,50,100,"Tümü"]],responsive:!0,processing:!0,serverSide:!0,dom:'<"d-flex justify-content-between align-items-center mb-3"<"d-flex align-items-center"l>><"toolbar d-flex justify-content-end">>t<"d-flex justify-content-between align-items-center mt-3"<"d-flex align-items-center"i><"d-flex align-items-center"p>>',ajax:{headers:{Authorization:"Bearer "+document.querySelector('meta[name="api-token"]').getAttribute("content")}},renderer:"bootstrap"})};document.addEventListener("theme-changed",r=>{const e=r.detail.theme==="dark";document.querySelectorAll(".dataTables_wrapper select, .dataTables_wrapper input").forEach(o=>{o.classList.toggle("bg-dark",e),o.classList.toggle("text-light",e)})});export{u as d};
