"use client";

import type { CorpusItemDto } from "@/lib/api";
import { CorpusRow } from "./corpus-row";

interface CorpusListProps {
  items: CorpusItemDto[];
}

export function CorpusList({ items }: CorpusListProps) {
  return (
    <div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
      {items.map((item) => (
        <CorpusRow
          key={`${item.subject}:${item.predicate}:${item.value}`}
          item={item}
        />
      ))}
    </div>
  );
}
