import { jsx as _jsx } from "react/jsx-runtime";
import { Root } from "@powerhousedao/connect/components";
import { connectConfig } from "@powerhousedao/connect/config";
import { AtlasImport, Content } from "@powerhousedao/connect/pages";
import { Suspense } from "react";
import { RouterProvider, createBrowserRouter } from "react-router-dom";
function createRouter(routes) {
    const routerBasename = connectConfig.routerBasename;
    return createBrowserRouter(routes, {
        basename: routerBasename,
        future: {
            v7_fetcherPersist: true,
            v7_relativeSplatPath: true,
        },
    });
}
function createRoutes() {
    const routes = [
        {
            index: true,
            path: "d?/:driveId?/*?",
            element: (_jsx(Suspense, { name: "Drive", children: _jsx(Content, {}) })),
        },
        {
            path: "import/:documentId",
            element: (_jsx(Suspense, { name: "AtlasImport", children: _jsx(AtlasImport, {}) })),
        },
    ];
    return [
        {
            element: (_jsx(Suspense, { name: "RouteRoot", children: _jsx(Root, {}) })),
            children: routes,
        },
    ];
}
const routes = createRoutes();
const router = createRouter(routes);
export const Router = () => {
    return _jsx(RouterProvider, { router: router });
};
//# sourceMappingURL=router.js.map