import { registerBrowserAgentRoutes } from "./agent.js";
import { registerBrowserBasicRoutes } from "./basic.js";
import { registerBrowserTabRoutes } from "./tabs.js";
// Adapter to make express.Express compatible with BrowserRouteRegistrar
function createExpressAdapter(app) {
    return {
        get: (path, handler) => app.get(path, handler),
        post: (path, handler) => app.post(path, handler),
        delete: (path, handler) => app.delete(path, handler),
    };
}
export function registerBrowserRoutes(app, ctx) {
    // If app is express.Express, wrap it; otherwise use it directly
    const registrar = "use" in app ? createExpressAdapter(app) : app;
    registerBrowserBasicRoutes(registrar, ctx);
    registerBrowserTabRoutes(registrar, ctx);
    registerBrowserAgentRoutes(registrar, ctx);
}
