'use client'; import { useState } from 'react'; import Link from 'next/link'; import Image from 'next/image'; import type { TopProfessionalsContent } from '@/types/cms'; // Sample agents data for tabs const agentsData = [ { id: '1', name: 'Arjun Mehta', subtitle: '(Residential Property Expert)', location: 'San Francisco, CA', experience: '10+ years in the real estate industry.', expertise: ['Residential', 'Rental', 'Commercial', 'Inspection', 'Land', 'Rental'], imageUrl: '/assets/images/professional-1.jpg', }, { id: '2', name: 'Arjun Mehta', subtitle: '(Residential Property Expert)', location: 'San Francisco, CA', experience: '10+ years in the real estate industry.', expertise: ['Residential', 'Rental', 'Commercial', 'Inspection', 'Land', 'Rental'], imageUrl: '/assets/images/professional-2.jpg', }, { id: '3', name: 'Arjun Mehta', subtitle: '(Residential Property Expert)', location: 'San Francisco, CA', experience: '10+ years in the real estate industry.', expertise: ['Residential', 'Rental', 'Commercial', 'Inspection', 'Land', 'Rental'], imageUrl: '/assets/images/professional-3.jpg', }, ]; const lendersData = [ { id: '4', name: 'Sarah Johnson', subtitle: '(Mortgage Specialist)', location: 'Los Angeles, CA', experience: '10+ years in mortgage lending.', expertise: ['FHA Loans', 'Conventional', 'VA Loans', 'Refinancing', 'Jumbo'], imageUrl: '/assets/images/professional-1.jpg', }, { id: '5', name: 'Michael Chen', subtitle: '(Senior Loan Officer)', location: 'Seattle, WA', experience: '7+ years in lending.', expertise: ['Jumbo Loans', 'Refinancing', 'Investment', 'First-time', 'USDA'], imageUrl: '/assets/images/professional-2.jpg', }, { id: '6', name: 'Emily Davis', subtitle: '(Home Loan Advisor)', location: 'Austin, TX', experience: '5+ years in mortgage industry.', expertise: ['First-time Buyers', 'FHA', 'USDA Loans', 'VA Loans', 'Conventional'], imageUrl: '/assets/images/professional-3.jpg', }, ]; interface ProfessionalCardProps { name: string; subtitle: string; location: string; experience: string; expertise: string[]; imageUrl: string; } function ProfessionalCard({ name, subtitle, location, experience, expertise, imageUrl, }: ProfessionalCardProps) { return (
{/* Image */}
{name}
{/* Content */}
{/* Name */}

{name}

{/* Subtitle */}

{subtitle}

{/* Verified Badge */}
Verified “Verified local agent”
{/* Location */}

Location:

Location {location}
{/* Expertise */}

Expertise:

{expertise.slice(0, 6).map((tag, index) => ( {tag} ))}
{/* Experience */}

Experience: {experience}

{/* Star Rating */}
{[...Array(5)].map((_, i) => ( Star ))}
); } const defaultContent: TopProfessionalsContent = { title: '\u201cMeet top real estate professionals\u201d', ctaText: 'Discover 5,000+ Top Real Estate Agents in Our Network.', ctaButtonText: 'Browse Experts', agents: agentsData, lenders: lendersData, }; export function TopProfessionals({ content }: { content?: TopProfessionalsContent }) { const data = content ?? defaultContent; const [activeTab, setActiveTab] = useState<'agents' | 'lenders'>('agents'); const displayData = activeTab === 'agents' ? data.agents : data.lenders; return (
{/* Section Header */}

{data.title}

{/* Tabs Container */}
{/* Agents Tab */} {/* Divider */}
{/* Lenders Tab */}
{/* Cards Grid - 3 cards + CTA sidebar */}
{/* Professional Cards */} {displayData.map((professional, index) => ( ))} {/* CTA Sidebar Card */}
{/* Building Icon */}
Building
{/* Text */}

{data.ctaText}

{/* Browse Experts Button */}
); }