"use client"; import { useEffect } from "react"; import Image from "next/legacy/image"; import gsap from "gsap"; import ScrollTrigger from "gsap/dist/ScrollTrigger"; import { Service } from "@/lib/api/serviceService"; import { serviceUtils } from "@/lib/api/serviceService"; interface TransformProps { service: Service; } const Transform = ({ service }: TransformProps) => { useEffect(() => { gsap.registerPlugin(ScrollTrigger); // Check if elements exist before animating const footFadeElements = document.querySelectorAll(".foot-fade"); if (footFadeElements.length > 0) { gsap.set(".foot-fade", { x: -100, opacity: 0, }); ScrollTrigger.batch(".foot-fade", { start: "-100px bottom", onEnter: (elements) => gsap.to(elements, { x: 0, opacity: 1, stagger: 0.3, }), }); } }, []); return (
Transform Your Business

Transform your business with {service.title}

{service.description}

{service.title}
Why Choose Us

{service.why_choose_description || `Why choose our ${service.title.toLowerCase()}?`}

{service.features && service.features.length > 0 ? ( service.features.slice(0, 6).map((feature, index) => (
{feature.title}

{feature.description}

)) ) : ( // Fallback content if no features are available <>
Fast Delivery

{service.duration ? `Delivered in ${service.duration}` : 'Quick turnaround times for your project needs'}

Quality Assured

Rigorous testing and quality control ensure reliable, robust solutions

Ongoing Support

Comprehensive support and maintenance to ensure optimal performance

)}
Our Expertise

Our Expertise

{service.expertise_description && (

{service.expertise_description}

)}
{service.expertise_items && service.expertise_items.length > 0 ? ( service.expertise_items.slice(0, 3).map((expertise, index) => (
{expertise.title}

{expertise.description}

)) ) : ( // Fallback content if no expertise items are available <>
Expert Team

Our experienced team specializes in {service.title.toLowerCase()} with years of industry expertise.

Modern Technologies

We use cutting-edge technologies and frameworks to deliver scalable, secure solutions.

Proven Results

We have successfully delivered solutions to numerous clients, helping them achieve their goals.

)}
); }; export default Transform;