import { useState, useEffect, useRef } from "react"; import { Link } from "react-router-dom"; import Navbar from "@/components/Navbar"; import Footer from "@/components/Footer"; import HeroSection from "@/components/HeroSection"; import ServiceLifecycle from "@/components/ServiceLifecycle"; import { Star, Award, Building2, BadgeCheck, Anchor, Plane, Hammer, FlaskConical, ChevronLeft, ChevronRight } from "lucide-react"; import { useLanguage } from "@/contexts/LanguageContext"; import Certifications from "@/components/certifications"; import Chatbot from "@/components/Chatbot"; import About from "@/components/about"; import Stats from "@/components/stats"; import GlobalHero from "@/components/globalhero"; import Request from "@/components/request"; import OurCapabilities from "@/components/OurCapabilities"; import SEO from "@/components/SEO"; // Images import industryOilGas from "@/assets/industry-oil-gas.jpg"; import industryPower from "@/assets/industry-power.jpg"; import industryWater from "@/assets/industry-water.jpg"; import industryCement from "@/assets/industry-cement.jpg"; // ===================================================== // DATA (Updated with IDs matching RelatedIndustries paths) // ===================================================== const journeyItems = [ { id: "oil-gas", image: industryOilGas, title: "Oil & Gas", icon: Building2 }, { id: "power", image: industryPower, title: "Power Industry", icon: Award }, { id: "water", image: industryWater, title: "Water Treatment", icon: Star }, { id: "cement", image: industryCement, title: "Cement Industry", icon: BadgeCheck }, { id: "marine", image: industryOilGas, title: "Marine & Defense", icon: Anchor }, { id: "refinery", image: industryPower, title: "Refinery & Petrochemical", icon: Plane }, { id: "chemical", image: industryWater, title: "Chemical Process", icon: FlaskConical }, { id: "lng", image: industryCement, title: "LNG & Cryogenic", icon: Hammer }, ]; // ===================================================== // BUSINESS JOURNEY (AUTO + MANUAL SCROLL) // ===================================================== const BusinessJourney = () => { const trackRef = useRef(null); const isDragging = useRef(false); const startX = useRef(0); const scrollX = useRef(0); const [paused, setPaused] = useState(false); // ---- Manual Drag (Mouse + Touch) const onStart = (x: number) => { isDragging.current = true; startX.current = x; scrollX.current = trackRef.current!.scrollLeft; setPaused(true); }; const onMove = (x: number) => { if (!isDragging.current) return; const walk = startX.current - x; trackRef.current!.scrollLeft = scrollX.current + walk; }; const onEnd = () => { isDragging.current = false; setTimeout(() => setPaused(false), 1200); }; // ---- Button Scroll const scrollByAmount = (dir: "left" | "right") => { setPaused(true); trackRef.current?.scrollBy({ left: dir === "left" ? -350 : 350, behavior: "smooth", }); setTimeout(() => setPaused(false), 1500); }; return (
{/* Header */}
OUR BUSINESS

Susin Journey

{/* Manual Buttons */} {/* Slider */}
onStart(e.pageX)} onMouseMove={(e) => onMove(e.pageX)} onMouseUp={onEnd} onMouseLeave={onEnd} onTouchStart={(e) => onStart(e.touches[0].pageX)} onTouchMove={(e) => onMove(e.touches[0].pageX)} onTouchEnd={onEnd} >
{/* Double map for infinite scroll effect */} {[...journeyItems, ...journeyItems].map((item, index) => ( {item.title}

{item.title}

))}
); }; // ===================================================== // INDEX PAGE // ===================================================== export default function Index() { const { t } = useLanguage(); useEffect(() => { window.scrollTo(0, 0); document.documentElement.style.scrollBehavior = "smooth"; return () => { document.documentElement.style.scrollBehavior = "auto"; }; }, []); return (
); }