"use client" import React, { useState, useEffect } from 'react'; import { ChevronLeft, ChevronRight } from 'lucide-react'; interface Solution { id: string; title: string; description: string; backgroundImage: string; category: string; } const SolutionsCarousel: React.FC = () => { const [activeTab, setActiveTab] = useState('E-Commerce'); const [currentSlide, setCurrentSlide] = useState(0); const tabs = [ 'E-Commerce', 'Automotive', 'Insurance', 'Media & Entertainment', 'Gaming', 'Industries' ]; const solutions: { [key: string]: Solution[] } = { 'E-Commerce': [ { id: 'ecommerce-1', title: 'E-Commerce', description: 'Build scalable online retail platforms with secure payment processing, inventory management, and customer analytics to drive digital commerce growth.', backgroundImage: '/images/ecommerce-bg.jpg', category: 'E-Commerce' } ], 'Automotive': [ { id: 'automotive-1', title: 'Automotive', description: 'Transform the automotive industry with connected vehicle solutions, autonomous driving technologies, and smart manufacturing processes.', backgroundImage: '/images/ecommerce-bg.jpg', category: 'Automotive' } ], 'Insurance': [ { id: 'insurance-1', title: 'Insurance', description: 'Rapidly establish comprehensive insurance service systems to ease digital transformation with compliant, secure, and reliable infrastructure such as FinTech Cloud and Dedicated Cloud.', backgroundImage: '/images/ecommerce-bg.jpg', category: 'Insurance' } ], 'Media & Entertainment': [ { id: 'media-1', title: 'Media & Entertainment', description: 'Deliver high-quality streaming experiences with content delivery networks, media processing, and audience engagement platforms.', backgroundImage: '/images/ecommerce-bg.jpg', category: 'Media & Entertainment' } ], 'Gaming': [ { id: 'gaming-1', title: 'Gaming', description: 'Power immersive gaming experiences with low-latency infrastructure, real-time multiplayer capabilities, and scalable game backend services.', backgroundImage: '/images/ecommerce-bg.jpg', category: 'Gaming' } ], 'Smart City': [ { id: 'smartcity-1', title: 'Industries', description: 'Build intelligent urban infrastructure with IoT sensors, data analytics, and AI-powered solutions for sustainable city management.', backgroundImage: '/images/ecommerce-bg.jpg', category: 'Industries' } ] }; const currentSolutions = solutions[activeTab] || []; const nextSlide = () => { setCurrentSlide((prev) => prev === currentSolutions.length - 1 ? 0 : prev + 1 ); }; const prevSlide = () => { setCurrentSlide((prev) => prev === 0 ? currentSolutions.length - 1 : prev - 1 ); }; // Reset current slide when tab changes useEffect(() => { setCurrentSlide(0); }, [activeTab]); return (
{/* Title */}

Solutions for Unleashing Digital and Powering Innovation

{/* Tabs */}
{tabs.map((tab) => ( ))}
{/* Carousel */}
{currentSolutions.length > 0 && (
{/* Background Image */}
{/* Overlay */}
{/* Content */}

{currentSolutions[currentSlide]?.title}

{currentSolutions[currentSlide]?.description}

{/* Navigation Arrows */} {currentSolutions.length > 1 && ( <> )} {/* Dots Indicator */} {currentSolutions.length > 1 && (
{currentSolutions.map((_, index) => (
)}
)} {/* Empty State */} {currentSolutions.length === 0 && (

No solutions available for this category

)}
); }; export default SolutionsCarousel;