"use client" import { Shield, Crown, CheckCircle, Mail } from "lucide-react" import { motion } from "motion/react" interface ProfileHeaderProps { name: string email?: string role: string | null verified: boolean createdAt: string } const roleConfig: Record = { admin: { label: "Admin", color: "bg-yellow-500/20 text-yellow-400 border-yellow-500/30", icon: Crown }, contributor: { label: "Contributor", color: "bg-blue-500/20 text-blue-400 border-blue-500/30", icon: Shield }, user: { label: "Member", color: "bg-text/10 text-text/60 border-text/20", icon: Shield }, } export function ProfileHeader({ name, email, role, verified, createdAt }: ProfileHeaderProps) { const config = roleConfig[role || "user"] || roleConfig.user const RoleIcon = config.icon const joinDate = new Date(createdAt).toLocaleDateString("en-US", { month: "long", year: "numeric", }) return (

{name}

{config.label} {verified && ( Verified )}
Member since {joinDate} {email && ( <> · {email} )}
) }