import { baseOptions } from "@/lib/layout.shared";
import { source } from "@/lib/source";
import { DocsLayout } from "fumadocs-ui/layouts/docs";
import type { Metadata } from "next";

export const metadata: Metadata = {
  title: {
    default: "Cours Docker | Le serveur de Leon",
    template: "%s | Le serveur de Leon",
  },
  description: "Support de cours Docker, des fondamentaux au déploiement.",
};

export default function DocsRootLayout({ children }: LayoutProps<"/docs">) {
  return (
    <DocsLayout
      {...baseOptions()}
      tree={source.getPageTree()}
      tabs={false}
      sidebar={{
        collapsible: true,
        defaultOpenLevel: 1,
      }}
      containerProps={{ className: "server-docs" }}
    >
      {children}
    </DocsLayout>
  );
}
