import type { User, Healer } from "@/lib/user-database" import { Card, CardContent } from "@/components/ui/card" import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" import { Badge } from "@/components/ui/badge" import { Shield, Heart, MapPin, Briefcase, Calendar } from "lucide-react" interface ProfileHeaderProps { user: User } export function ProfileHeader({ user }: ProfileHeaderProps) { const getInitials = (name: string) => { return name .split(" ") .map((part) => part[0]) .join("") .toUpperCase() .substring(0, 2) } const getVerificationBadge = (user: Healer) => { if (user.verificationStatus === "verified") { return Verified } else if (user.verificationStatus === "rejected") { return Rejected } else { return Pending Verification } } return (
{user.profileImage ? ( ) : ( {getInitials(user.fullName)} )}

{user.fullName}

{user.type === "guardian" ? ( <> Guardian ) : ( <> Healer )} {user.type === "healer" && getVerificationBadge(user)}
{user.type === "guardian" ? ( <>
{user.country}
) : ( <>
{user.role} {user.specialization && • {user.specialization}}
{user.city}, {user.country}
)}
Joined {new Date(user.registeredAt).toLocaleDateString()}
{user.type === "healer" && user.bio &&

{user.bio}

} {user.type === "guardian" && user.motivation && (

Why I became a Guardian:

"{user.motivation}"

)}
) }