import{a as h}from"./index-DZ_Kha3d.js";import{T as m,P as g}from"./bootstrap.esm-Bb7dPm-H.js";window.axios=h;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";class c{constructor(){this.themeToggle=document.getElementById("themeToggle"),this.currentTheme=localStorage.getItem("store_theme")||"light",this.init()}init(){this.themeToggle&&(this.setTheme(this.currentTheme,!1),this.themeToggle.addEventListener("click",()=>{const e=this.currentTheme==="light"?"dark":"light";this.setTheme(e,!0)}))}setTheme(e,t=!0){var s,i;const o=document.documentElement,a=this.themeToggle.querySelector("i");this.currentTheme=e,localStorage.setItem("store_theme",e),t||(o.style.transition="none"),o.setAttribute("data-bs-theme",e),o.classList.toggle("dark-theme",e==="dark"),t||(o.offsetWidth,o.style.transition=""),a.className=e==="dark"?"fas fa-moon":"fas fa-sun";const n=((s=window.translations)==null?void 0:s.store_nav_theme_switch_dark)||"Switch to Dark Theme",l=((i=window.translations)==null?void 0:i.store_nav_theme_switch_light)||"Switch to Light Theme";this.themeToggle.setAttribute("aria-label",e==="dark"?l:n)}}document.addEventListener("DOMContentLoaded",()=>{new c,[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map(t=>new m(t)),[...document.querySelectorAll('[data-bs-toggle="popover"]')].map(t=>new g(t))});
