import { motion } from 'framer-motion'; import { Mail, Phone, Building2, User } from 'lucide-react'; import type { Faculty } from '@/types'; interface FacultyCardProps { faculty: Faculty; } const AVATAR_COLORS = [ ['#F97316', '#FB923C'], ['#8B5CF6', '#A78BFA'], ['#10B981', '#34D399'], ['#3B82F6', '#60A5FA'], ['#EC4899', '#F472B6'], ['#F59E0B', '#FCD34D'], ]; export default function FacultyCard({ faculty }: FacultyCardProps) { const colorIndex = parseInt(faculty.id) % AVATAR_COLORS.length; const [from, to] = AVATAR_COLORS[colorIndex]; const initials = faculty.name .split(' ') .filter((_, i) => i === 0 || i === faculty.name.split(' ').length - 1) .map((n) => n[0]) .join(''); return ( {/* Avatar + Name */}
{initials}

{faculty.name}

{faculty.designation}

{/* Details */}
{faculty.department}
{faculty.office && (
{faculty.office}
)} {faculty.specialization && (
{faculty.specialization}
)}
{/* Contact */}
Email {faculty.phone && ( Call )}
); }