import React from "react";
import SongRow from "./SongRow";

interface SongTableProps {
  songs: string[];
  onDelete: (index: number) => void;
  onSkipTo: (index: number) => void;
}

const SongTable: React.FC<SongTableProps> = ({ songs, onDelete, onSkipTo }) => {
  return (
    <div className="flex flex-col w-full h-full overflow-y-auto border-y">
      {songs.map((song, index) => (
        <SongRow 
          key={index} 
          song={song} 
          onDelete={() => onDelete(index)} 
          onPlay={() => onSkipTo(index)} 
        />
      ))}
    </div>
  );
};

export default SongTable;