import { jsx as _jsx } from "react/jsx-runtime";
import { Screen, Overlay } from './router.js';
import { OutageScreen } from './screens/OutageScreen.js';
import { IntroScreen } from './screens/IntroScreen.js';
import { SetupScreen } from './screens/SetupScreen.js';
import { AuthScreen } from './screens/AuthScreen.js';
import { CreateProjectScreen } from './screens/CreateProjectScreen.js';
import { RegionSelectScreen } from './screens/RegionSelectScreen.js';
import { EmailCaptureScreen } from './screens/EmailCaptureScreen.js';
import { ToSScreen } from './screens/ToSScreen.js';
import { DataSetupScreen } from './screens/DataSetupScreen.js';
import { ActivationOptionsScreen } from './screens/ActivationOptionsScreen.js';
import { RunScreen } from './screens/RunScreen.js';
import { McpScreen } from './screens/McpScreen.js';
import { DataIngestionCheckScreen } from './screens/DataIngestionCheckScreen.js';
import { SlackScreen } from './screens/SlackScreen.js';
import { LogoutScreen } from './screens/LogoutScreen.js';
import { LoginScreen } from './screens/LoginScreen.js';
import { OutroScreen } from './screens/OutroScreen.js';
import { createMcpInstaller } from './services/mcp-installer.js';
import { SnakeGame } from './primitives/index.js';
export function createServices(localMcp = false) {
    return {
        mcpInstaller: createMcpInstaller(localMcp),
    };
}
export function createScreens(store, services) {
    return {
        // Overlays
        [Overlay.Outage]: _jsx(OutageScreen, { store: store }),
        [Overlay.Snake]: (_jsx(SnakeGame, { onExit: () => store.hideSnakeOverlay(), music: false })),
        [Overlay.Mcp]: (_jsx(McpScreen, { store: store, installer: services.mcpInstaller, onComplete: () => store.hideMcpOverlay() })),
        [Overlay.Slack]: (_jsx(SlackScreen, { store: store, onComplete: () => store.hideSlackOverlay() })),
        [Overlay.Logout]: (_jsx(LogoutScreen, { onComplete: () => store.hideLogoutOverlay(), installDir: store.session.installDir, onLoggedOut: () => store.clearAuthForLogout() })),
        [Overlay.Login]: (_jsx(LoginScreen, { store: store, onComplete: () => store.hideLoginOverlay() })),
        // Wizard flow
        [Screen.Intro]: _jsx(IntroScreen, { store: store }),
        [Screen.Setup]: _jsx(SetupScreen, { store: store }),
        [Screen.Auth]: _jsx(AuthScreen, { store: store }),
        [Screen.CreateProject]: _jsx(CreateProjectScreen, { store: store }),
        [Screen.RegionSelect]: _jsx(RegionSelectScreen, { store: store }),
        [Screen.EmailCapture]: _jsx(EmailCaptureScreen, { store: store }),
        [Screen.ToS]: _jsx(ToSScreen, { store: store }),
        [Screen.DataSetup]: _jsx(DataSetupScreen, { store: store }),
        [Screen.ActivationOptions]: _jsx(ActivationOptionsScreen, { store: store }),
        [Screen.Options]: null,
        [Screen.Run]: _jsx(RunScreen, { store: store }),
        [Screen.Mcp]: _jsx(McpScreen, { store: store, installer: services.mcpInstaller }),
        [Screen.DataIngestionCheck]: _jsx(DataIngestionCheckScreen, { store: store }),
        [Screen.Outro]: _jsx(OutroScreen, { store: store }),
        // Standalone MCP flows
        [Screen.McpAdd]: (_jsx(McpScreen, { store: store, installer: services.mcpInstaller, standalone: true })),
        [Screen.McpRemove]: (_jsx(McpScreen, { store: store, installer: services.mcpInstaller, mode: "remove", standalone: true })),
        // Slack integration
        [Screen.Slack]: _jsx(SlackScreen, { store: store }),
        [Screen.SlackSetup]: _jsx(SlackScreen, { store: store, standalone: true }),
    };
}
