/**
* The SPA shell: a slim brand top-bar (logo + wordmark) over the two-pane Home
* workspace and a privacy footer. A shared link (`#s=…`) seeds settings on load.
*
* Temporarily removed (see notes/plans/removed-pending-readd.md): the centered
* hero, the local/online mode badge, and the Settings button + drawer.
* @module web-app/App
*/
import { useEffect } from "react";
import { useSettings } from "./lib/settings.js";
import { readSharedSettings } from "./lib/share.js";
import Home from "./components/Home.jsx";
/**
* The application shell component.
* @returns {JSX.Element} The app (top bar + Home + footer).
*/
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
export default function App() {
const [settings, setSettings] = useSettings();
// A shared link (#s=...) seeds settings on load, then the hash is cleared.
useEffect(() => {
const shared = readSharedSettings();
if (shared) {
setSettings(s => ({
...s,
...shared
}));
history.replaceState(null, "", location.pathname + location.search);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return /*#__PURE__*/_jsxDEV("div", {
className: "app",
children: [/*#__PURE__*/_jsxDEV("header", {
className: "topbar",
children: /*#__PURE__*/_jsxDEV("div", {
className: "brand",
children: [/*#__PURE__*/_jsxDEV("img", {
src: "/logo.png",
alt: ""
}, void 0, false), /*#__PURE__*/_jsxDEV("span", {
className: "wordmark",
children: "Random AI Prompt"
}, void 0, false)]
}, void 0, true)
}, void 0, false), /*#__PURE__*/_jsxDEV("main", {
children: /*#__PURE__*/_jsxDEV(Home, {
settings: settings,
setSettings: setSettings
}, void 0, false)
}, void 0, false), /*#__PURE__*/_jsxDEV("footer", {
children: "Stored only in this browser · bring your own API key · nothing saved on a server"
}, void 0, false)]
}, void 0, true);
}