"use client";

import { useParams } from "next/navigation";
import DocumentDetail from "@/components/main/content/document-detail";

export default function DetailDocumentInfo() {
  const params = useParams();
  const idParam = params?.id;
  const id =
    typeof idParam === "string"
      ? Number(idParam)
      : Array.isArray(idParam)
      ? Number(idParam[0])
      : 0;

  return <DocumentDetail id={id} />;
}
