import React from 'react';
import { FiGrid, FiList } from 'react-icons/fi';

const ViewToggle = ({ viewMode, onViewModeChange }) => {
  return (
    <div className="view-toggle">
      <button
        className={`view-toggle-btn ${viewMode === 'cards' ? 'active' : ''}`}
        onClick={() => onViewModeChange('cards')}
        title="Visualização em Cards"
      >
        <FiGrid />
      </button>
      <button
        className={`view-toggle-btn ${viewMode === 'list' ? 'active' : ''}`}
        onClick={() => onViewModeChange('list')}
        title="Visualização em Lista"
      >
        <FiList />
      </button>
    </div>
  );
};

export default ViewToggle;
