import { createRoot } from 'react-dom/client';
import { App } from './App';
import './styles/variables.css';
import './styles/index.css';
import './styles/components.css';
import './styles/messages.css';
import './styles/input.css';
import './styles/highlight.css';
(function detectTheme() {
const bg = getComputedStyle(document.body).getPropertyValue('--vscode-editor-background').trim();
if (!bg) return;
const m = bg.match(/[\d.]+/g);
if (!m || m.length < 3) return;
const [r, g, b] = m.map(Number);
const lum = 0.299 * r + 0.587 * g + 0.114 * b;
if (lum > 160) {
document.body.classList.add('vscode-light');
}
})();
const root = document.getElementById('root');
if (root) {
createRoot(root).render(<App />);
}