import { ArrowDown, ArrowUp, Calendar, Eye, FileText, Github, Globe, Linkedin, MapPin, MessageSquare, Star, Twitter, Users, } from "lucide-react"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { cn } from "@/lib/utils"; interface Stat { label: string; value: string; change?: number; icon: "eye" | "users" | "star" | "file" | "message"; } interface User { name: string; avatar?: string; coverImage?: string; role?: string; company?: string; location?: string; joinedAt?: string; bio?: string; socialLinks?: { twitter?: string; linkedin?: string; github?: string; website?: string; }; } interface UserProfile9Props { user?: User; stats?: Stat[]; className?: string; } const statIcons = { eye: Eye, users: Users, star: Star, file: FileText, message: MessageSquare, }; const UserProfile9 = ({ user = { name: "امیر رضایی", avatar: "/block-media/shadcnblocks/block/avatar/avatar5.webp", coverImage: "/block-media/shadcnblocks/block/photos/pawel-czerwinski-O4fAgtXLRwI-unsplash.jpg", role: "مهندس ارشد نرم‌افزار", company: "ورسل", location: "تهران، ایران", joinedAt: "فروردین ۱۴۰۰", bio: "ساخت آینده توسعه وب. مشارکت‌کننده متن‌باز، علاقه‌مند به TypeScript و عاشق قهوه. سابقه کار در استرایپ و گوگل.", socialLinks: { twitter: "https://twitter.com", linkedin: "https://linkedin.com", github: "https://github.com", website: "https://example.com", }, }, stats = [ { label: "بازدید پروفایل", value: "۱۲٬۸۴۷", change: 12.5, icon: "eye", }, { label: "دنبال‌کننده", value: "۸٬۴۲۰", change: 8.2, icon: "users", }, { label: "ستاره دریافت‌شده", value: "۲٬۱۵۶", change: -3.1, icon: "star", }, { label: "پست‌ها", value: "۱۴۲", change: 24.8, icon: "file" }, ], className, }: UserProfile9Props) => { const initials = user.name .split(" ") .map((n) => n[0]) .join(""); return (
{initials}

{user.name}

{user.role} {user.company && ( {" "} در {user.company} )}

{user.location && ( {user.location} )} {user.joinedAt && ( عضویت از {user.joinedAt} )}
{user.bio && (

{user.bio}

)}
{user.socialLinks?.twitter && ( )} {user.socialLinks?.linkedin && ( )} {user.socialLinks?.github && ( )} {user.socialLinks?.website && ( )}
{stats.map((stat) => { const Icon = statIcons[stat.icon]; const isPositive = stat.change && stat.change > 0; const isNegative = stat.change && stat.change < 0; return ( {stat.label}
{stat.value}
{stat.change !== undefined && (

{isPositive && } {isNegative && } {Math.abs(stat.change).toLocaleString("fa-IR", { useGrouping: false, })} ٪ نسبت به ماه قبل

)}
); })}
); }; export { UserProfile9 };