import Link from "next/link";
import type { Section } from "@/lib/types";
import type { Locale } from "@/lib/i18n";

export default function SectionNav({
  sections,
  locale,
}: {
  sections: Section[];
  locale: Locale;
}) {
  return (
    <div className="card">
      <div style={{ display: "flex", gap: 10, flexWrap: "wrap" }}>
        {sections.map((s) => (
          <Link
            key={s.id}
            className="badge"
            href={`/${locale}/section/${s.id}`}
          >
            {s.label}
          </Link>
        ))}
      </div>
    </div>
  );
}
