import {createRoot} from 'react-dom/client';
import App from './App.tsx';
import './index.css';

try {
  const win = window as unknown as { __nativeFetch?: typeof window.fetch };
  const nativeFetch = win.__nativeFetch || window.fetch.bind(window);
  win.__nativeFetch = nativeFetch;
  Object.defineProperty(window, 'fetch', {
    configurable: true,
    enumerable: true,
    get: () => nativeFetch,
    set: () => {
      // No-op: prevent external browser extensions from replacing native fetch
    },
  });
} catch {
  // Ignore if environment locks descriptor
}

createRoot(document.getElementById('root')!).render(<App />);

