import {Link} from 'react-router-dom';
import {useTranslation} from 'react-i18next';
import {Dices, Inbox, Shuffle} from 'lucide-react';
import {Button} from '@/components/ui/button';
import {Card} from '@/components/ui/card';
import {cn} from '@/lib/utils';
import GameCover from './GameCover.jsx';
import PileTrend from './stats/PileTrend.jsx';
import {StatCount} from './stats/StatDrill.jsx';
import {backlogShare, pileGames} from '../utils/backlog.js';
import {sliceColors, statusSlices} from '../utils/statCharts.js';
import {formatPlaytime} from '../utils/games.js';
import {libraryLink} from '../utils/statGames.js';
/**
* @param trend the TREND group of GET /api/library/stats; the card shows no trend while it is missing
*/
export default function PileOfShameCard({summary, trend, syncing, onShuffle, shuffling}) {
const {t, i18n} = useTranslation();
const backlog = pileGames(summary);
const suggestion = summary.suggestion;
const slices = statusSlices(summary.byStatus);
const colors = sliceColors(slices);
if (syncing && summary.total === 0) {
return (
{t('LIBRARY.SYNCING_FIRST_TIME')}
{t('DASHBOARD.BACKLOG_EMPTY')}
{slices.map(({name: s, value}, i) => (