"use client"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { Edit, Trash2, Users } from "lucide-react"; interface TreeItemRowProps { icon?: React.ReactNode; title: string; subtitle?: string; badges?: Array<{ text: string; variant?: "default" | "secondary" | "destructive" | "outline"; className?: string; }>; onEdit?: () => void; onDelete?: () => void; onViewMembers?: () => void; canDelete?: boolean; showSeparator?: boolean; additionalInfo?: React.ReactNode; hasMembers?: boolean; } export function TreeItemRow({ icon, title, subtitle, badges = [], onEdit, onDelete, onViewMembers, canDelete = true, showSeparator = false, additionalInfo, hasMembers = false, }: TreeItemRowProps) { return (
{/* Séparateur entre items */} {showSeparator &&
}
{icon}

{title}

{badges.map((badge, index) => ( {badge.text} ))} {subtitle && (

{subtitle}

)}
{/* Informations additionnelles (comme les métriques) */} {additionalInfo && (
{additionalInfo}
)} {/* Actions */}
{onViewMembers && hasMembers && ( )} {onEdit && ( )} {onDelete && ( )}
); }