"use client";

import Link from "next/link";
import NavbarLayoutFloatingInline from "@/components/navbar/NavbarLayoutFloatingInline";
import HeroBillboard from "@/components/sections/hero/HeroBillboard";
import TextAbout from "@/components/sections/about/TextAbout";
import ContactSplitForm from "@/components/sections/contact/ContactSplitForm";
import FooterCard from "@/components/sections/footer/FooterCard";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import { Github, Twitter, Linkedin, Sparkles, BookOpen } from "lucide-react";

export default function InterpreterPage() {
  const navItems = [
    { name: "Home", id: "home" },
    { name: "Learn Python", id: "learn" },
    { name: "Practice", id: "practice" },
    { name: "Interpreter", id: "interpreter" },
  ];

  const navLinks = [
    { href: "/", label: "Home" },
    { href: "/learn", label: "Learn Python" },
    { href: "/practice", label: "Practice" },
    { href: "/interpreter", label: "Interpreter" },
  ];

  return (
    <ThemeProvider
      defaultButtonVariant="shift-hover"
      defaultTextAnimation="reveal-blur"
      borderRadius="pill"
      contentWidth="small"
      sizing="medium"
      background="blurBottom"
      cardStyle="gradient-mesh"
      primaryButtonStyle="gradient"
      secondaryButtonStyle="glass"
      headingFontWeight="extrabold"
    >
      <div id="nav" data-section="nav">
        <NavbarLayoutFloatingInline
          navItems={navItems}
          brandName="PyLearn"
          button={{
            text: "Get Started",
            href: "/learn",
          }}
        />
      </div>

      <div id="hero" data-section="hero" className="mx-auto px-4 md:px-6 py-12 md:py-20">
        <HeroBillboard
          title="Write Python Code Directly in Your Browser"
          description="No installation required. Run Python code instantly with our integrated browser-based interpreter powered by Pyodide. Perfect for learning, testing, and experimenting with Python."
          background={{
            variant: "sparkles-gradient",
          }}
          tag="Run Code Instantly"
          tagIcon={Sparkles}
          tagAnimation="slide-up"
          buttons={[
            {
              text: "Start Coding Now",
              href: "#interpreter-section",
            },
            {
              text: "Learn Python First",
              href: "/learn",
            },
          ]}
          buttonAnimation="blur-reveal"
          imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B6sh1xZKNJYDe63NCnshCWKiPL/a-browser-based-python-interpreter-inter-1773824100739-2213359b.png?_wi=2"
          imageAlt="Online Python interpreter interface"
          mediaAnimation="slide-up"
        />
      </div>

      <div id="about" data-section="about" className="mx-auto px-4 md:px-6 py-12 md:py-20">
        <TextAbout
          tag="Browser-Based Python"
          tagIcon={BookOpen}
          tagAnimation="slide-up"
          title="The Most Accessible Python Interpreter Ever"
          useInvertedBackground={true}
          buttons={[
            {
              text: "Explore Features",
              href: "#features",
            },
          ]}
          buttonAnimation="blur-reveal"
        />
      </div>

      <div id="contact" data-section="contact" className="mx-auto px-4 md:px-6 py-12 md:py-20">
        <ContactSplitForm
          title="Start Coding in Python Right Now"
          description="Have questions about the interpreter or want to share feedback? Reach out to us. We'd love to hear from you!"
          imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B6sh1xZKNJYDe63NCnshCWKiPL/a-browser-based-python-interpreter-inter-1773824100739-2213359b.png?_wi=3"
          imageAlt="Python interpreter interface"
          mediaAnimation="slide-up"
          mediaPosition="right"
          useInvertedBackground={true}
          inputs={[
            {
              name: "name",
              type: "text",
              placeholder: "Your Name",
            },
            {
              name: "email",
              type: "email",
              placeholder: "your@email.com",
            },
          ]}
          textarea={{
            name: "message",
            placeholder: "Tell us about your experience with the interpreter...",
          }}
          buttonText="Send Feedback"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterCard
          logoText="PyLearn"
          copyrightText="© 2024 PyLearn | Making Python Education Accessible"
          socialLinks={[
            {
              icon: Github,
              href: "https://github.com",
              ariaLabel: "GitHub",
            },
            {
              icon: Twitter,
              href: "https://twitter.com",
              ariaLabel: "Twitter",
            },
            {
              icon: Linkedin,
              href: "https://linkedin.com",
              ariaLabel: "LinkedIn",
            },
          ]}
        />
      </div>
    </ThemeProvider>
  );
}