import React, { useEffect, useState } from 'react';
import type { ReactElement } from 'react';
import Head from 'next/head';
import Link from 'next/link';
import { useAppSelector } from '../../stores/hooks';
import LayoutGuest from '../../layouts/Guest';
import WebSiteHeader from '../../components/WebPageComponents/Header';
import WebSiteFooter from '../../components/WebPageComponents/Footer';
import {
  HeroDesigns,
  ContactFormDesigns,
} from '../../components/WebPageComponents/designs';

import HeroSection from '../../components/WebPageComponents/HeroComponent';

import ContactFormSection from '../../components/WebPageComponents/ContactFormComponent';

export default function WebSite() {
  const cardsStyle = useAppSelector((state) => state.style.cardsStyle);
  const bgColor = useAppSelector((state) => state.style.bgLayoutColor);
  const projectName = 'CuriousDemo';

  useEffect(() => {
    const darkElement = document.querySelector('body .dark');
    if (darkElement) {
      darkElement.classList.remove('dark');
    }
  }, []);

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Contact Us - Flatlogic AI Architect`}</title>
        <meta
          name='description'
          content={`Get in touch with the Flatlogic AI Architect team. We're here to assist you with any inquiries or support you may need.`}
        />
      </Head>
      <WebSiteHeader projectName={'CuriousDemo'} />
      <main className={`flex-grow  ${bgColor}    rounded-none  `}>
        <HeroSection
          projectName={'CuriousDemo'}
          image={['Customer service representative smiling']}
          mainText={`Reach Out to ${projectName} Today`}
          subTitle={`We're here to assist you with any questions or support you need. Connect with our team and experience exceptional service.`}
          design={HeroDesigns.TEXT_CENTER || ''}
          buttonText={`Contact Us Now`}
        />

        <ContactFormSection
          projectName={'CuriousDemo'}
          design={ContactFormDesigns.WITH_IMAGE || ''}
          image={['Person typing on a laptop']}
          mainText={`Get in Touch with ${projectName} `}
          subTitle={`Feel free to reach out to us anytime. Our team at ${projectName} is ready to assist you and will respond promptly to your inquiries.`}
        />
      </main>
      <WebSiteFooter projectName={'CuriousDemo'} />
    </div>
  );
}

WebSite.getLayout = function getLayout(page: ReactElement) {
  return <LayoutGuest>{page}</LayoutGuest>;
};
