"use client" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { Button } from '@/components/ui/button' import { useLocale } from '@/contexts/LocaleContext' import { Package, SelectedPackage } from '@/types' import { X, PackageOpen, Download } from 'lucide-react' interface SelectionManagerProps { selectedPackages: SelectedPackage[] onPackageRemove: (pkgId: string) => void onClearAll: () => void onGenerateScript: () => void } export function SelectionManager({ selectedPackages, onPackageRemove, onClearAll, onGenerateScript }: SelectionManagerProps) { const { t } = useLocale() if (selectedPackages.length === 0) { return ( {t('selection.none')} ) } return ( {t('selection.title')} ({selectedPackages.length}) {t('selection.description')} {t('selection.clear_all')} {t('selection.generate_script')} {selectedPackages.map((pkg) => ( {pkg.name} {pkg.version} {pkg.description} {pkg.type?.toUpperCase() || 'CLI'} • {pkg.repository || 'official'} onPackageRemove(pkg.id)} className="ml-2" > ))} ) }
{t('selection.none')}
{pkg.description}