import React from 'react';

interface SaveLoadControlsProps {
  onSave: () => void;
  onLoad: () => void;
  onRestart: () => void;
  isSaveDataPresent: boolean;
}

const SaveLoadControls: React.FC<SaveLoadControlsProps> = ({ onSave, onLoad, onRestart, isSaveDataPresent }) => {
  const baseButtonClass = "px-4 py-1.5 text-sm border rounded transition-colors duration-200";
  const disabledButtonClass = "border-gray-600 text-gray-600 cursor-not-allowed";
  
  return (
    <div className="flex items-center space-x-3">
      <button onClick={onSave} className={`${baseButtonClass} border-emerald-600 text-emerald-400 hover:bg-emerald-900/50`}>
        Save
      </button>
      <button 
        onClick={onLoad} 
        disabled={!isSaveDataPresent} 
        className={`${baseButtonClass} ${isSaveDataPresent ? 'border-emerald-600 text-emerald-400 hover:bg-emerald-900/50' : disabledButtonClass}`}
      >
        Load
      </button>
      <button onClick={onRestart} className={`${baseButtonClass} border-red-600 text-red-400 hover:bg-red-900/50`}>
        Restart
      </button>
    </div>
  );
};

export default SaveLoadControls;
