import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "hono/jsx/jsx-runtime"; import { readFileSync } from "fs"; import { join } from "path"; export function clientEntry(c) { let jsFile = "/src/client/main.tsx"; let cssFiles = null; if (process.env.NODE_ENV === 'production') { try { // Read Vite manifest to get the correct file names const manifestPath = join(process.cwd(), 'dist', '.vite', 'manifest.json'); const manifest = JSON.parse(readFileSync(manifestPath, 'utf-8')); const entry = manifest['index.html']; if (entry) { jsFile = `/${entry.file}`; if (entry.css) { cssFiles = entry.css.map((css) => `/${css}`); } } } catch (error) { console.warn('Could not read Vite manifest, using fallback:', error); // Fallback to a generic path jsFile = "/assets/index-Ccx6A0bN.js"; cssFiles = ["/assets/index-RdX4PbOO.css"]; } } return c.html(_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("meta", { charSet: "utf-8" }), _jsx("meta", { content: "width=device-width, initial-scale=1", name: "viewport" }), _jsx("title", { children: "Stargirlnails Kiel" }), _jsx("link", { rel: "icon", type: "image/png", href: "/favicon.png" }), cssFiles && cssFiles.map((css) => (_jsx("link", { rel: "stylesheet", href: css }, css))), process.env.NODE_ENV === 'production' ? (_jsx("script", { src: jsFile, type: "module" })) : (_jsxs(_Fragment, { children: [_jsx("script", { src: "/@vite/client", type: "module" }), _jsx("script", { src: jsFile, type: "module" })] }))] }), _jsx("body", { children: _jsx("div", { id: "root" }) })] })); }