"use client";
import { useState } from "react";
import { MarkdownRenderer } from "@/components/markdown/MarkdownRenderer";
import { TableOfContents } from "@/components/markdown/TableOfContents";

export default function AvisosLegaisPage() {
  const [headings, setHeadings] = useState([] as { id: string; text: string; level: number }[]);
  return (
    <div className="grid grid-cols-1 md:grid-cols-[1fr_280px] gap-6 lg:gap-8">
      <div className="min-w-0">
        <MarkdownRenderer contentPath={"pt/avisos-legais.md"} onHeadings={setHeadings} />
      </div>
      <aside className="min-w-0">
        <TableOfContents headings={headings} />
      </aside>
    </div>
  );
}
