import { createRoot } from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import App from './App.tsx';
import './index.css';
import { CapacitorUpdater } from '@capgo/capacitor-updater';
import { App as CapApp } from '@capacitor/app';

CapacitorUpdater.notifyAppReady();

CapApp.addListener('appRestoredResult', () => {
  CapacitorUpdater.notifyAppReady();
});

CapApp.addListener('resume', () => {
  CapacitorUpdater.notifyAppReady();
});

createRoot(document.getElementById('root')!).render(
  <BrowserRouter future={{ v7_startTransition: true, v7_relativeSplatPath: true }}>
    <App />
  </BrowserRouter>
);