import { createNativeAdapter, createRouter, type NavigationBootstrap, } from "@getforma/router"; // All code/registrations arrive in the verified group bootstrap. Responses carry // typed owner data, never new executable code. Public-only demo: no auth context. export default async function initialize(bootstrap: NavigationBootstrap) { const root = document.querySelector("[data-forma-router-root]")!; const router = createRouter({ root, base: "/lab/router/", recoveryKey: bootstrap.build, adapter: createNativeAdapter(bootstrap), routes: [ { id: "router-shell", children: [ { id: "router-overview", index: true }, { id: "router-details", path: "details" }, ], }, ], }); await router.ready; root.setAttribute("data-router-ready", ""); }