import Link from "next/link"; import { Card, Badge } from "./ui"; import { getServerTranslations } from "../../lib/i18n/server"; interface LibrarySubPageHeaderProps { library: { id: string; name: string; root_path: string; book_count: number; enabled: boolean; }; title: string; icon: React.ReactNode; iconColor?: string; filterInfo?: { label: string; clearHref: string; clearLabel: string; }; } export async function LibrarySubPageHeader({ library, title, icon, iconColor = "text-primary", filterInfo }: LibrarySubPageHeaderProps) { const { t } = await getServerTranslations(); return (
{/* Header avec breadcrumb intégré */}
{t("libraryHeader.libraries")} / {library.name}

{icon} {title}

{/* Info Bar - Version améliorée */}
{/* Path */}
{library.root_path}
{/* Divider */} {/* Book count */}
{t("libraryHeader.bookCount", { count: library.book_count, plural: library.book_count !== 1 ? "s" : "" })}
{/* Divider */} {/* Status */} {library.enabled ? t("libraryHeader.enabled") : t("libraries.disabled")}
{/* Filter Info (optionnel) */} {filterInfo && (

{filterInfo.label}

{filterInfo.clearLabel}
)}
); }