"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import ReactLenis from "lenis/react";
import AboutMetric from '@/components/sections/about/AboutMetric';
import ContactSplitForm from '@/components/sections/contact/ContactSplitForm';
import FooterLogoReveal from '@/components/sections/footer/FooterLogoReveal';
import NavbarLayoutFloatingInline from '@/components/navbar/NavbarLayoutFloatingInline';
import { AlertTriangle, Cog, Truck } from "lucide-react";

export default function LandingPage() {
  return (
    <ThemeProvider
        defaultButtonVariant="directional-hover"
        defaultTextAnimation="entrance-slide"
        borderRadius="pill"
        contentWidth="small"
        sizing="mediumSizeLargeTitles"
        background="blurBottom"
        cardStyle="inset"
        primaryButtonStyle="flat"
        secondaryButtonStyle="glass"
        headingFontWeight="medium"
    >
      <ReactLenis root>
  <div id="nav" data-section="nav">
      <NavbarLayoutFloatingInline
      navItems={[
        {
          name: "Acasă",          id: "/"},
        {
          name: "Programare VTP",          id: "/programare-vtp"},
        {
          name: "Intervenții",          id: "/interventii"},
        {
          name: "Centrale Termice",          id: "/centrale-termice"},
        {
          name: "ENA CONFORT",          id: "/ena-confort"},
        {
          name: "Contact",          id: "/#contact"},
      ]}
      brandName="ENA INSTAL"
      button={{
        text: "Login Admin",        href: "/admin"}}
      animateOnLoad={true}
    />
  </div>

  <div id="interventii-intro" data-section="interventii-intro">
      <AboutMetric
      useInvertedBackground={false}
      title="Solicită Intervenție pentru Defecțiune"
      metrics={[
        {
          icon: AlertTriangle,
          label: "Urgență",          value: "Prioritară"},
        {
          icon: Truck,
          label: "Timp Răspuns",          value: "Rapid"},
        {
          icon: Cog,
          label: "Expertiză",          value: "Garantată"},
      ]}
      metricsAnimation="slide-up"
    />
  </div>

  <div id="interventii-form" data-section="interventii-form">
      <ContactSplitForm
      useInvertedBackground={false}
      title="Detalii Intervenție"
      description="Completează cât mai multe detalii pentru a facilita diagnosticarea și intervenția rapidă."
      inputs={[
        {
          name: "nume",          type: "text",          placeholder: "Numele tău",          required: true,
        },
        {
          name: "telefon",          type: "tel",          placeholder: "Telefon",          required: true,
        },
        {
          name: "email",          type: "email",          placeholder: "Email",          required: true,
        },
        {
          name: "adresa",          type: "text",          placeholder: "Adresă completă",          required: true,
        },
        {
          name: "modelCentrala",          type: "text",          placeholder: "Model Centrală",          required: false,
        },
        {
          name: "codEroare",          type: "text",          placeholder: "Cod Eroare (dacă există)",          required: false,
        },
      ]}
      textarea={{
        name: "descriereProblema",        placeholder: "Descrie problema",        rows: 4,
        required: true,
      }}
      buttonText="Trimite Solicitarea"
      onSubmit={(data) => console.log('Intervenție solicitare submitted:', { ...data, status: 'Nou', createdAt: new Date().toISOString(), imageUploadPlaceholder: 'file_upload_logic_here' })}
      imageSrc="http://img.b2bpic.net/free-photo/worker-repairing-water-heater_23-2149334227.jpg"
      imageAlt="Worker repairing water heater"
    />
  </div>

  <div id="footer" data-section="footer">
      <FooterLogoReveal
      logoText="ENA INSTAL"
      leftLink={{
        text: "Confidentialitate",        href: "#"}}
      rightLink={{
        text: "Termeni și Condiții",        href: "#"}}
    />
  </div>
      </ReactLenis>
    </ThemeProvider>
  );
}
