import {StrictMode} from 'react';
import {createRoot} from 'react-dom/client';
import App from './App.tsx';
import './index.css';
import { registerWorkboxServiceWorker, precacheAllSupportedLanguages } from './utils/workboxImageCache';

// Initialize Workbox Service Worker and local image caching
registerWorkboxServiceWorker().then((registered) => {
  if (registered) {
    precacheAllSupportedLanguages();
  }
});

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

