import type { Metadata } from "next"
import { driveDocumentTitle, suitePageMetadata } from "@/lib/suite/page-metadata"

type LayoutProps = {
  children: React.ReactNode
  params: Promise<{ segments?: string[] }>
}

export async function generateMetadata({ params }: LayoutProps): Promise<Metadata> {
  const { segments } = await params
  return suitePageMetadata({
    app: "drive",
    titleSegment: driveDocumentTitle(segments),
  })
}

export default function DriveSegmentsLayout({ children }: LayoutProps) {
  return children
}
