"use client";

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

interface CorpusListProps {
  patterns: PatternDto[];
}

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