"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import ReactLenis from "lenis/react";
import { useState, useEffect } from "react";
import ContactSplit from '@/components/sections/contact/ContactSplit';
import FeatureCardThree from '@/components/sections/feature/featureCardThree/FeatureCardThree';
import FooterBase from '@/components/sections/footer/FooterBase';
import HeroLogo from '@/components/sections/hero/HeroLogo';
import MetricCardThree from '@/components/sections/metrics/MetricCardThree';
import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple';
import ProductCardOne from '@/components/sections/product/ProductCardOne';
import SplitAbout from '@/components/sections/about/SplitAbout';
import TestimonialCardOne from '@/components/sections/testimonial/TestimonialCardOne';
import { Award, CheckCircle, Zap } from "lucide-react";

export default function LandingPage() {
  const [data, setData] = useState<any>(null);

  useEffect(() => {
    const fetchData = async () => {
      // Simulated asynchronous data work
      setData({ loaded: true });
    };
    fetchData();
  }, []);

  return (
    <ThemeProvider
        defaultButtonVariant="shift-hover"
        defaultTextAnimation="entrance-slide"
        borderRadius="soft"
        contentWidth="mediumLarge"
        sizing="mediumSizeLargeTitles"
        background="circleGradient"
        cardStyle="gradient-radial"
        primaryButtonStyle="radial-glow"
        secondaryButtonStyle="layered"
        headingFontWeight="semibold"
    >
      <ReactLenis root>
  <div id="nav" data-section="nav">
      <NavbarStyleApple
      navItems={[
        { name: "Home", id: "hero" },
        { name: "About", id: "about" },
        { name: "Products", id: "products" },
        { name: "Contact", id: "contact" },
      ]}
      brandName="Maz Branding"
    />
  </div>

  <div id="hero" data-section="hero">
      <HeroLogo
      logoText="Maz Branding"
      description="Your premier partner for professional corporate gifts, high-quality printing, and brand identity solutions in Sandton. Reliable, efficient, and affordable."
      buttons={[
        { 
          text: "View Products", 
          onClick: () => {
            const el = document.getElementById('products');
            if (el) el.scrollIntoView({ behavior: 'smooth' });
          }
        },
        {
          text: "Contact Us",          onClick: () => {
            const el = document.getElementById('contact');
            if (el) el.scrollIntoView({ behavior: 'smooth' });
          }
        },
      ]}
      imageSrc="http://img.b2bpic.net/free-photo/working-space-interior-design_53876-138470.jpg"
    />
  </div>

  <div id="about" data-section="about">
      <SplitAbout
      textboxLayout="split"
      useInvertedBackground={false}
      title="Excellence in Corporate Branding"
      description="Located in the heart of Parkmore, Sandton, Maz Branding specializes in delivering professional corporate gifting and high-quality printing services. We help businesses communicate their brand identity effectively through precision-crafted promotional products."
      bulletPoints={[
        {
          title: "Reliable Service",          description: "Consistently delivered on time with professional care."},
        {
          title: "Efficient Production",          description: "Fast-tracked processes to meet your deadlines."},
        {
          title: "Affordable Quality",          description: "Premium brand solutions tailored to your budget."},
      ]}
      imageSrc="http://img.b2bpic.net/free-photo/scenery-designers-work_23-2149741841.jpg"
    />
  </div>

  <div id="products" data-section="products">
      <ProductCardOne
      animationType="slide-up"
      textboxLayout="default"
      gridVariant="uniform-all-items-equal"
      useInvertedBackground={false}
      products={[
        { id: "p1", name: "Premium Executive Pens", price: "R 150", imageSrc: "http://img.b2bpic.net/free-photo/assortment-natural-material-stationery_23-2148898262.jpg" },
        { id: "p2", name: "Branded Notebooks", price: "R 280", imageSrc: "http://img.b2bpic.net/free-photo/top-view-hands-holding-pen-notebook_23-2149328238.jpg" },
        { id: "p3", name: "Promotional Flasks", price: "R 350", imageSrc: "http://img.b2bpic.net/free-photo/assortment-tumbler-with-copy-space_23-2149029272.jpg" },
        { id: "p4", name: "Custom Corporate Shirts", price: "R 420", imageSrc: "http://img.b2bpic.net/free-photo/top-view-shirt-shop-post-box_1150-6707.jpg" },
        { id: "p5", name: "Tech Gadgets Set", price: "R 850", imageSrc: "http://img.b2bpic.net/free-photo/young-pretty-woman-holding-wireless-speaker-listening-music-wearing-striped-shirt-blue-hat-smiling-happy-positive-mood-posing-pink-background-isolated_285396-10666.jpg" },
        { id: "p6", name: "Leather Portfolios", price: "R 600", imageSrc: "http://img.b2bpic.net/free-photo/man-creates-leather-ware_1157-34007.jpg" },
      ]}
      title="Our Corporate Collection"
      description="From premium executive gifts to everyday promotional items, we ensure every product reflects the high standards of your business."
    />
  </div>

  <div id="features" data-section="features">
      <FeatureCardThree
      animationType="slide-up"
      textboxLayout="default"
      gridVariant="three-columns-all-equal-width"
      useInvertedBackground={false}
      features={[
        {
          title: "High Quality Printing",          description: "State-of-the-art printing technology for vivid, professional results.",          imageSrc: "http://img.b2bpic.net/free-photo/halloween-decor-white-table-black-wall_176420-9127.jpg"},
        {
          title: "Expert Guidance",          description: "Professional advice on the best branding solutions for your event.",          imageSrc: "http://img.b2bpic.net/free-photo/side-view-woman-working-with-printer_23-2149713678.jpg"},
        {
          title: "Nationwide Reach",          description: "Delivering excellence beyond Sandton across the region.",          imageSrc: "http://img.b2bpic.net/free-photo/top-view-tech-desk-tools_23-2149552418.jpg"},
      ]}
      title="Why Choose Maz Branding?"
      description="We are proud of our reputation for excellence in Sandton."
    />
  </div>

  <div id="metrics" data-section="metrics">
      <MetricCardThree
      animationType="slide-up"
      textboxLayout="default"
      useInvertedBackground={false}
      metrics={[
        { id: "m1", icon: CheckCircle, title: "Clients Served", value: "500+" },
        { id: "m2", icon: Award, title: "Average Rating", value: "5.0" },
        { id: "m3", icon: Zap, title: "Projects Completed", value: "1200+" },
      ]}
      title="Service Excellence in Numbers"
      description="Trusted by businesses and professionals for high-impact results."
    />
  </div>

  <div id="testimonials" data-section="testimonials">
      <TestimonialCardOne
      animationType="slide-up"
      textboxLayout="default"
      gridVariant="uniform-all-items-equal"
      useInvertedBackground={false}
      testimonials={[
        { id: "1", name: "Tatenda Mazarura", role: "Client", company: "Sandton Corporate", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/smiling-lady-black-jacket-posing-isolated-background-happy-cheerful-woman-dark-suit-laughing-looking-into-camera_197531-18513.jpg" },
        { id: "2", name: "Nonkolo Mlunjwana", role: "Local Guide", company: "Sandton", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/smiling-senior-businessman-talking-partner_1262-1998.jpg" },
        { id: "3", name: "Onismo Murambiwa", role: "Manager", company: "Corporate Firm", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/portrait-handsome-smiling-young-man-online-tutor-businessman-working-cafe-remotely-waving-hand-laptop-connects-video-chat-meeting_1258-314662.jpg" },
        { id: "4", name: "Sarah Miller", role: "Director", company: "Retail Group", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/portrait-smiling-senior-man-holding-smart-phone_23-2147935571.jpg" },
        { id: "5", name: "James Smith", role: "Coordinator", company: "Event Tech", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/business-partners-office-closeup_273609-4120.jpg" },
      ]}
      title="Client Feedback"
      description="See what our clients have to say about our professional service."
    />
  </div>

  <div id="contact" data-section="contact">
      <ContactSplit
      useInvertedBackground={false}
      background={{ variant: "gradient-bars" }}
      tag="Contact Us"
      title="Ready to Start Your Project?"
      description="Get in touch with us at our Parkmore offices today. We look forward to creating exceptional branding for you."
      imageSrc="http://img.b2bpic.net/free-photo/graphic-2d-colorful-wallpaper-with-grainy-gradients_23-2151001633.jpg"
      buttonText="Send Inquiry"
    />
  </div>

  <div id="footer" data-section="footer">
      <FooterBase
      columns={[
        {
          title: "About Us",          items: [
            { label: "Our Story", href: "#about" },
            { label: "Services", href: "#products" },
          ],
        },
        {
          title: "Contact",          items: [
            { label: "70 11th St, Parkmore", href: "#" },
            { label: "010 065 1362", href: "tel:0100651362" },
          ],
        },
      ]}
      logoText="Maz Branding"
    />
  </div>
      </ReactLenis>
    </ThemeProvider>
  );
}