import { FileAudioIcon, FileStackIcon, ImageIcon } from "lucide-react"; import type { ComponentType } from "react"; import { Button } from "@/components/ui/button"; import type { AttachmentLibraryStats, AttachmentLibraryTab } from "@/hooks/useAttachmentLibrary"; import { cn } from "@/lib/utils"; import { useTranslate } from "@/utils/i18n"; interface AttachmentLibraryToolbarProps { activeTab: AttachmentLibraryTab; onTabChange: (tab: AttachmentLibraryTab) => void; stats: AttachmentLibraryStats; } const TAB_CONFIG: Array<{ key: AttachmentLibraryTab; labelKey: "media" | "documents" | "audio"; icon: ComponentType<{ className?: string }>; count: (stats: AttachmentLibraryStats) => number; }> = [ { key: "media", labelKey: "media", icon: ImageIcon, count: (stats) => stats.media }, { key: "audio", labelKey: "audio", icon: FileAudioIcon, count: (stats) => stats.audio }, { key: "documents", labelKey: "documents", icon: FileStackIcon, count: (stats) => stats.documents }, ]; const AttachmentLibraryToolbar = ({ activeTab, onTabChange, stats }: AttachmentLibraryToolbarProps) => { const t = useTranslate(); return (