import{u as e,a as t,r as s,j as o,O as c,c as n}from"./index-B0ZII33g.js";import"./constants-qmQlET8G.js";function a(){const{loadFromStorage:n}=e(),{effectiveTheme:a,updateEffectiveTheme:i}=t();return s.useEffect(()=>{n(),i()},[n,i]),s.useEffect(()=>{document.documentElement.classList.toggle("dark","dark"===a)},[a]),o.jsx("div",{className:"omni-popup-container",children:o.jsx(c,{isOpen:!0,mode:"inline"})})}document.body.classList.add("popup-mode"),document.documentElement.classList.add("popup-mode");(async()=>{try{const e=(await chrome.storage.local.get("kimchi_ui_settings")).kimchi_ui_settings,t=e?.theme||"system";if("system"===t){const e=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle("dark",e)}else document.documentElement.classList.toggle("dark","dark"===t)}catch(e){console.error("Failed to initialize theme:",e)}})();const i=document.getElementById("root");i&&n.createRoot(i).render(o.jsx(s.StrictMode,{children:o.jsx(a,{})}));
