import React, { useState } from 'react';
import { Sidebar as Shuffle, Users, BookOpen, ChartLine } from 'lucide-react';
const BookCard = ({ book, onRecommend, mode = 'popular', onViewDetails }) => {
const [isHovered, setIsHovered] = useState(false);
return (
setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
onClick={() => onViewDetails && onViewDetails(book)}
>
{mode === 'results' && (
<>
{book.type === 'hybrid' ? : book.type === 'collaborative' ? : }
{book.type || 'hybrid'}
{Math.round((book.score || 0.85) * 100)}% Match
>
)}

e.target.src = 'https://via.placeholder.com/150x200?text=No+Image'}
/>
{book.title}
{book.author}
{(book.year || book.publisher) && (
{book.year || 'N/A'} • {book.publisher || 'N/A'}
)}
);
};
export default BookCard;