import React from 'react';
import { Navbar } from '@/components/Navbar';
import { Hero } from '@/components/Hero';
import { ServicesOverview } from '@/components/ServicesOverview';
import { AboutSection } from '@/components/AboutSection';
import { SpecialtiesSection } from '@/components/SpecialtiesSection';
import { HowItWorks } from '@/components/HowItWorks';
import { WhyChooseUs } from '@/components/WhyChooseUs';
import { ServiceAreas } from '@/components/ServiceAreas';
import { ImageGallery } from '@/components/ImageGallery';
import { SocialMediaSection } from '@/components/SocialMediaSection';
import { Testimonials } from '@/components/Testimonials';
import { FaqSection } from '@/components/FaqSection';
import { BookingSection } from '@/components/BookingSection';
import { ContactSection } from '@/components/ContactSection';
import { Footer } from '@/components/Footer';
import { MobileBottomBar } from '@/components/MobileBottomBar';
import { FloatingWhatsApp } from '@/components/FloatingWhatsApp';

export default function Home() {
  // The useAuth hook provides authentication state.
  // To implement login/logout, call logout(), or start login from an event
  // handler: onClick={() => startLogin()} (imported from "@/const"). Never call
  // startLogin() during render (no href={startLogin()}) — it mints a one-time
  // nonce cookie and must run only at the moment of navigation.
  // useAuth removed for clean static/dynamic landing page

  const handleScrollToBooking = (serviceName?: string) => {
    const el = document.getElementById('booking');
    if (el) {
      el.scrollIntoView({ behavior: 'smooth' });
    }
  };

  return (
    <div className="min-h-screen flex flex-col font-sans bg-white text-slate-900 selection:bg-sky-200 selection:text-sky-900">
      {/* Navbar */}
      <Navbar onBookClick={handleScrollToBooking} />

      {/* Main Content */}
      <main className="flex-grow">
        <Hero onBookClick={handleScrollToBooking} />
        <ServicesOverview onSelectService={handleScrollToBooking} />
        <AboutSection />
        <SpecialtiesSection onBookClick={handleScrollToBooking} />
        <HowItWorks />
        <WhyChooseUs />
        <ServiceAreas />
        <ImageGallery />
        <SocialMediaSection />
        <Testimonials />
        <FaqSection />
        <BookingSection />
        <ContactSection />
      </main>

      {/* Footer */}
      <Footer />

      {/* Mobile Bottom Navigation & Floating WhatsApp */}
      <MobileBottomBar onBookClick={handleScrollToBooking} />
      <FloatingWhatsApp />
    </div>
  );
}
