'use client'; import Image from 'next/image'; import type { TestimonialsContent } from '@/types/cms'; const defaultTestimonials = [ { id: '1', rating: 5, title: 'I have been working with Lorem ..', content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean commodo ligula eget dolor. Sed dignissim, nisl eget tincidunt vulputate, lacus justo bibendum ipsum, vitae tempus risus lorem at nunc. Integer sed arcu vitae risus feugiat vehicula. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.', author: 'Conor Kenney', role: 'Chief Operations Officer', }, { id: '2', rating: 5, title: 'I have been working with Lorem ..', content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean commodo ligula eget dolor. Sed dignissim, nisl eget tincidunt vulputate, lacus justo bibendum ipsum, vitae tempus risus lorem at nunc. Integer sed arcu vitae risus feugiat vehicula. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.', author: 'Conor Kenney', role: 'Chief Operations Officer', }, { id: '3', rating: 5, title: 'I have been working with Lorem ..', content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean commodo ligula eget dolor. Sed dignissim, nisl eget tincidunt vulputate, lacus justo bibendum ipsum, vitae tempus risus lorem at nunc. Integer sed arcu vitae risus feugiat vehicula. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.', author: 'Conor Kenney', role: 'Chief Operations Officer', }, ]; interface TestimonialCardProps { title: string; content: string; author: string; role: string; rating: number; } function TestimonialCard({ title, content, author, role, rating }: TestimonialCardProps) { return (
{/* Quote Icon */}
Quote
{/* Title */}

{title}

{/* Content */}

{content}

{/* Star Rating */}
{[...Array(rating)].map((_, i) => ( Star ))}
{/* Author Info */}

{author}

{role}

); } const defaultContent: TestimonialsContent = { title: "Our Clients' Trust Is Our Foundation", subtitle: 'We help buyers, sellers, and investors close successful real estate deals with confidence in every transaction.', ratingInfo: 'Clients rate our real estate services 4.9 out of 5 on average, based on recent client reviews.', stats: [ { iconPath: '/assets/icons/cities-icon.svg', boldText: '25+ Cities &', normalText: 'neighborhoods served', }, { iconPath: '/assets/icons/properties-icon.svg', boldText: '1,000+ Properties', normalText: 'bought and sold for our clients.', }, ], testimonials: defaultTestimonials, }; export function TestimonialsSection({ content }: { content?: TestimonialsContent }) { const data = content ?? defaultContent; return (
{/* Section Header */}

{data.title}

{data.subtitle}

{data.ratingInfo}

{/* Stats Section */}
{data.stats.map((stat, index) => (
{stat.boldText}
{stat.normalText}
))}
{/* Divider Line */}
{/* Testimonials Grid */}
{data.testimonials.map((testimonial, index) => ( ))}
); }