"use client" import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" import { Button } from "@/components/ui/button" import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "@/registry/ui/empty" import { PlusIcon } from "lucide-react" import { useState, type ReactNode } from "react" interface TeamMember { id: string name: string image: string initials: string } interface EmptyAvatarGroupProps { onInvite?: () => void title?: string description?: string buttonText?: string } const defaultMembers: TeamMember[] = [ { id: "1", name: "Alex Chen", image: "https://github.com/shadcn.png", initials: "AC", }, { id: "2", name: "Sarah Kim", image: "https://github.com/maxleiter.png", initials: "SK", }, { id: "3", name: "Mike Johnson", image: "https://github.com/evilrabbit.png", initials: "MJ", }, ] export default function EmptyAvatarGroupDemo({ onInvite, title = "Development Team", description = "Connect with your development team to start building amazing projects together.", buttonText = "Add Team Member", }: EmptyAvatarGroupProps): ReactNode { const [isLoading, setIsLoading] = useState(false) const handleInviteClick = async (): Promise => { setIsLoading(true) try { if (onInvite) { await onInvite() } } finally { setIsLoading(false) } } return (
{defaultMembers.map((member: TeamMember) => ( {member.initials} ))}
{title} {description}
) }