import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { ErrorBoundary } from './components/ErrorBoundary';
import './i18n';
import './index.css';

// Enable dev mode for styling without LIFF setup. Gated on an explicit env
// flag (VITE_DEV_NO_LIFF=true) rather than Vite's mode so it never leaks into
// preview/staging builds that happen to be served via `vite dev`.
if (import.meta.env.VITE_DEV_NO_LIFF === 'true') {
  window.__DEV_NO_LIFF__ = true;
  console.log('🎨 Dev mode enabled - using mock data for styling');
}

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

