"use client"; import React, { useState, useEffect } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import Image from 'next/image'; import { ArrowLeft, ArrowRight, Star, Quote } from 'lucide-react'; const testimonials = [ { id: 1, name: "Rajesh Kumar", role: "Owner, Urban Bites – Chennai", quote: "“Peak hours used to feel chaotic. With Dine360, billing is faster, kitchen sync is smooth, and we’ve reduced order mistakes drastically. It’s like having full control over the entire floor.”", rating: 5, avatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?q=80&w=200&auto=format&fit=crop" }, { id: 2, name: "Emily Carter", role: "Founder, Brew & Bean Café", quote: "“We switched from spreadsheets and manual tracking to Dine360. Now inventory, sales, and reservations are all connected. It saves us hours every week and gives us clear performance insights.”", rating: 5, avatar: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?q=80&w=200&auto=format&fit=crop" }, { id: 3, name: "Michael Tan", role: "Operations Head, Spice Route Group (3 Branches)", quote: "“Managing multiple outlets was stressful before. With centralized reporting and branch-wise dashboards, we finally have clarity. Dine360 made scaling much easier.”", rating: 5, avatar: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?q=80&w=200&auto=format&fit=crop" }, { id: 4, name: "Anita Sharma", role: "Owner, Sweet Cravings Bakery", quote: "“The inventory tracking feature alone paid for itself. We’ve cut down wastage and improved stock planning significantly. It’s simple, reliable, and built for real restaurant challenges.”", rating: 5, avatar: "https://images.unsplash.com/photo-1580489944761-15a19d654956?q=80&w=200&auto=format&fit=crop" }, { id: 5, name: "David Morales", role: "Founder, QuickBite Food Truck", quote: "“Running a mobile operation needs speed and flexibility. Dine360 works perfectly on tablets and keeps everything synced — even when we’re on the move.”", rating: 5, avatar: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?q=80&w=200&auto=format&fit=crop" } ]; interface TestimonialsProps { title?: string; subtitle?: string; } const Testimonials = ({ title, subtitle }: TestimonialsProps) => { const [currentIndex, setCurrentIndex] = useState(0); // Auto-slide functionality useEffect(() => { const timer = setInterval(() => { handleNext(); }, 5000); // Change every 5 seconds return () => clearInterval(timer); }, [currentIndex]); const handleNext = () => { setCurrentIndex((prev) => (prev + 1) % testimonials.length); }; const handlePrev = () => { setCurrentIndex((prev) => (prev - 1 + testimonials.length) % testimonials.length); }; return (
{/* Background Paper Texture Overlay (Optional) */}
{/* Left Column: Chef Image */}
{/* Pattern */}
{[...Array(20)].map((_, i) => +)}
{/* Main Image */} Happy Chef {/* Floating Tomatoes Bottom Left */} {/* Tomatoes */}
{/* Right Column: Content */}
{/* Header */}
{title || "Testimonials"} {subtitle || "What Clients Say About Dine360"}
{/* Quote Icon */}
{/* Animated Testimonial Content */}

"{testimonials[currentIndex].quote}"

{testimonials[currentIndex].name}
{[...Array(5)].map((_, i) => ( ))}

{testimonials[currentIndex].name}

{testimonials[currentIndex].role}
{/* Navigation Buttons */}
); }; export default Testimonials;