"use client"; import React, { useState, useEffect } from "react"; const banners = [ { subTitle: "METATRONCUBE SOFTWARE SOLUTION", title: "WEB AND APP DEVELOPMENT PIONEERING INNOVATION", text: "Elevate your digital landscape with Metatroncube's cutting-edge web and mobile app solutions.", btnLabel: "Book Your Call Now", btnHref: "https://calendly.com/metatroncubeswsolutions/request-consultation", images: { center: "/assets/images/home/banner/web/centre.webp", leftBottom: "/assets/images/home/banner/web/left-bottom.webp", topRight: "/assets/images/home/banner/web/top-right.webp", rightBottom: "/assets/images/home/banner/web/right-bottom.webp", } }, { subTitle: "METATRONCUBE SOFTWARE SOLUTION", title: "DIGITAL MARKETING AMPLIFYING YOUR ONLINE VOICE", text: "Explore Metatroncube's innovative strategies to connect, engage, and grow your audience in the digital realm.", btnLabel: "Schedule Appointment", btnHref: "https://calendly.com/metatroncubeswsolutions/request-consultation", images: { center: "/assets/images/home/banner/digital/centre.webp", leftBottom: "/assets/images/home/banner/digital/right-bottom.png", topRight: "/assets/images/home/banner/digital/top-right.webp", rightBottom: "/assets/images/home/banner/digital/left-bottom.webp", } }, { subTitle: "METATRONCUBE SOFTWARE SOLUTION", title: "SEO STRATEGIES PAVING YOUR PATH TO SUCCESS", text: "Maximize visibility and drive traffic with Metatroncube's expert SEO strategies.", btnLabel: "REQUEST CONSULTATION", btnHref: "https://calendly.com/metatroncubeswsolutions/request-consultation", images: { center: "/assets/images/home/banner/seo/centre.webp", leftBottom: "/assets/images/home/banner/seo/left-bottom.webp", topRight: "/assets/images/home/banner/seo/top-right.webp", rightBottom: "/assets/images/home/banner/seo/right-bottom.webp", } }, { subTitle: "METATRONCUBE SOFTWARE SOLUTION", title: "GRAPHIC DESIGN CREATING VISUAL IMPACT", text: "Craft compelling visuals that enhance your brand identity with Metatroncube's graphic design services", btnLabel: "BOOK YOUR FREE CONSULTATION", btnHref: "https://calendly.com/metatroncubeswsolutions/request-consultation", images: { center: "/assets/images/home/banner/graphic/centre.webp", leftBottom: "/assets/images/home/banner/graphic/left-bottom.webp", topRight: "/assets/images/home/banner/graphic/top-right.webp", rightBottom: "/assets/images/home/banner/graphic/right-bottom.webp", } }, ]; const serviceCategories = [ { title: "Web Dev", image: "/assets/images/home/banner/web.webp", link: "/service/website-development-company" }, { title: "Mobile App", image: "/assets/images/home/banner/mbl.webp", link: "/service/mobile-application-development" }, { title: "Graphic Design", image: "/assets/images/home/banner/graphic.webp", link: "/service/graphic-designing-company" }, { title: "UI/UX", image: "/assets/images/home/banner/ui-ux.webp", link: "/service/ui-ux-designing" }, { title: "SEO", image: "/assets/images/home/banner/seo.webp", link: "/service/search-engine-optimization-seo-content-writing" }, { title: "Digital Marketing", image: "/assets/images/home/banner/digital.webp", link: "/service/digital-marketing-agency-in-canada" }, { title: "ERP", image: "/assets/images/home/banner/erp.webp", link: "/service/erp-development-implementation" }, ]; const BannerSection = () => { const [currentSlide, setCurrentSlide] = useState(0); const [currentBanner, setCurrentBanner] = useState(0); useEffect(() => { const serviceTimer = setInterval(() => { setCurrentSlide((prev) => (prev + 1) % serviceCategories.length); }, 2000); const bannerTimer = setInterval(() => { setCurrentBanner((prev) => (prev + 1) % banners.length); }, 9000); return () => { clearInterval(serviceTimer); clearInterval(bannerTimer); }; }, []); const nextSlide = () => setCurrentSlide((prev) => (prev + 1) % serviceCategories.length); const prevSlide = () => setCurrentSlide((prev) => (prev - 1 + serviceCategories.length) % serviceCategories.length); const goToBanner = (index: number) => setCurrentBanner(index); return (
{banners.map((banner, i) => (
{/* Left Side: Hero Text Content */}
{banner.subTitle}

{banner.title}

{banner.text}

{banner.btnLabel}
{/* Right Side: Floating Image Group + Category Slider */}
{/* shape */} t-shirt {/* shape */} shape shape shape
{/* Bottom Right "Our Service" Slider */}
Our Service
{/* Left Arrow (Overlapping Image) */}
{[...serviceCategories, ...serviceCategories].map((cat, idx) => ( ))}
))}
{/* Banner Pagination Dots */}
{banners.map((_, i) => (
goToBanner(i)} suppressHydrationWarning >
))}
); }; export default BannerSection;