import { initializeApp } from "./main.common";
import { logger } from "./utils/logger";

const platform = process.env.VITE_PLATFORM;

// PWA service worker is automatically registered by VitePWA plugin

const app = initializeApp();

// Note: Worker initialization is now handled by WebPlatformService
// This ensures single-point database access and prevents double migrations
if (platform === "web" || platform === "development") {
  logger.debug(
    "[Web] Database initialization will be handled by WebPlatformService",
  );
} else {
  logger.debug("[Web] SQL not initialized for platform", { platform });
}

app.mount("#app");
