import type { DatasetInfo } from "../types";

interface DatasetSelectorProps {
  datasets: DatasetInfo[];
  currentId: string;
  onSelect: (id: string) => void;
}

export default function DatasetSelector({ datasets, currentId, onSelect }: DatasetSelectorProps) {
  return (
    <select
      className="bg-gray-800 text-gray-200 text-xs rounded px-2 py-0.5 border border-gray-600 focus:border-emerald-500 outline-none"
      value={currentId}
      onChange={(e) => onSelect(e.target.value)}
    >
      {datasets.map((ds) => (
        <option key={ds.id} value={ds.id}>
          {ds.name}
        </option>
      ))}
    </select>
  );
}
