/**
 * UI-only app entry point.
 *
 * Nothing fancy: mount React into `#root` and let it take over. This template
 * has no server, no database, no sync — everything is local component state.
 * If you need persistence, the most common upgrades are:
 *
 *   - "I want to talk to an API" → add a server component (see `ui-db-app`).
 *   - "I want offline-first reads + multi-device sync" → see `realtime-app`.
 *
 * `StrictMode` double-invokes effects in dev to catch bugs from accidental
 * state mutation. It has no effect in production builds.
 *
 * Service worker: call `registerAppSW()` from `@kazzle/app/pwa` (paired with
 * `kazzleAppPwa()` in vite.config.ts). Do not import `virtual:pwa-register`.
 */

import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { registerAppSW } from '@kazzle/app/pwa';
import App from './App';
import './styles/theme.css';

// Production only — no-op in dev (`kazzleAppPwa` keeps `devOptions.enabled: false`).
registerAppSW();

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