import React from 'react';
import TarotCard from './TarotCard';

export default function CardGrid({ slice, onPick, disabledIds = [] }) {
  return (
    <div className="tarot-grid">
      {slice.map((card) => {
        const disabled = disabledIds.includes(card.slug);
        return (
          <TarotCard
            key={card.slug}
            card={card}
            faceDown
            clickable={!disabled}
            onClick={() => !disabled && onPick(card)}
          />
        );
      })}
    </div>
  );
}
