import { Hono } from "hono";
import { MiddlewareManager } from "../middlewares/middleware.js";
import type { MaybeAuthEnv } from "../types/app.types.js";
import { getBookingRouter } from "./invite.js";

export const getMaybeAuthenticatedRouter = () => {
  const maybeAuthenticated = new Hono<MaybeAuthEnv>();

  const middlewareManager = MiddlewareManager.getInstance();

  maybeAuthenticated.use(middlewareManager.maybeAuthenticated);

  maybeAuthenticated.route("/book", getBookingRouter());

  return maybeAuthenticated;
};
