import { Card } from 'primereact/card';
import { Button } from 'primereact/button';
import { FaCalendar, FaStar, FaCheckCircle, FaClock, FaEye } from 'react-icons/fa6';

interface SeasonShortProps {
    seasonNumber: number;
    title: string;
    episodeCount: number;
    firstEpisodeDate?: string;
    lastEpisodeDate?: string;
    announcementDate?: string;
    isCompleted: boolean;
    myRating?: number;
    userRating?: number;
    previewImage?: string;
    watchedPercentage?: number;
    totalDuration?: string;
}

const SeasonShort = ({
                        seasonNumber, title, episodeCount, firstEpisodeDate, lastEpisodeDate,
                        announcementDate, isCompleted, myRating, userRating, previewImage,
                        watchedPercentage, totalDuration
                    }: SeasonShortProps) => {
    return (
        <Card className="p-card p-shadow-2 p-mb-2 p-flex p-align-center">
            {previewImage && <img src={previewImage} alt={`Season ${seasonNumber}`} className="p-mr-2 border-round-md" width={100} />}
            <div className="p-flex-column p-ml-2">
                <h3 className="p-mb-1">Сезон {seasonNumber}: {title}</h3>
                <p><FaCalendar /> {firstEpisodeDate ?? announcementDate} - {lastEpisodeDate ?? 'Неизвестно'}</p>
                <p><FaClock /> {totalDuration ?? '—'} | <FaEye /> {watchedPercentage ?? 0}% просмотрено</p>
                <p><FaStar /> Оценка: {myRating ?? '—'} / {userRating ?? '—'}</p>
                <p><FaCheckCircle className={isCompleted ? 'text-green-500' : 'text-red-500'} /> {isCompleted ? 'Завершён' : 'В процессе'}</p>
                <p>Эпизодов: {episodeCount}</p>
            </div>
        </Card>
    );
};

export default SeasonShort;
