import { useEffect } from "react";

import ContactDetailsSection from "@/components/contact/ContactDetailsSection";
import ContactHeroSection from "@/components/contact/ContactHeroSection";
import Footer from "@/components/Footer";
import Header from "@/components/Header";
import SeoHead from "@/components/SeoHead";

export default function Contact({ settings, data, products, success }: { settings: any, data: any, products: any, success: string | null }) {
  useEffect(() => {
    window.scrollTo({ top: 0, left: 0, behavior: "auto" });
    console.log({products});
  }, [data,settings,products]);

  return (
    <>
    <SeoHead seo={data?.seo} />
    <div className="min-h-screen bg-white text-slate-900">
      <Header settings={settings} products={products} />
      <main className="flex-1">
        <ContactHeroSection data={data} />
        <ContactDetailsSection data={data} success={success} />
      </main>
      <Footer settings={settings} />
    </div>
    </>
  );
}
