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,
  AboutUsDesigns,
  ContactFormDesigns,
} from '../../components/WebPageComponents/designs';

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

import AboutUsSection from '../../components/WebPageComponents/AboutUsComponent';

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>{`About Us - Flatlogic AI Architect`}</title>
        <meta
          name='description'
          content={`Learn more about Flatlogic AI Architect, our mission, values, and the team dedicated to transforming software schema creation.`}
        />
      </Head>
      <WebSiteHeader projectName={'CuriousDemo'} />
      <main className={`flex-grow  ${bgColor}    rounded-none  `}>
        <HeroSection
          projectName={'CuriousDemo'}
          image={['Team brainstorming in office']}
          mainText={`Meet the Team Behind ${projectName}`}
          subTitle={`Discover the passion and expertise driving ${projectName}. Our dedicated team is committed to innovation and excellence in software schema creation.`}
          design={HeroDesigns.IMAGE_BG || ''}
          buttonText={`Explore Our Story`}
        />

        <AboutUsSection
          projectName={'CuriousDemo'}
          image={['Team collaborating on project']}
          mainText={`Our Journey with ${projectName}`}
          subTitle={`At ${projectName}, we are driven by a mission to simplify software schema creation. Our team is dedicated to providing innovative solutions that empower developers and businesses alike.`}
          design={AboutUsDesigns.IMAGE_LEFT || ''}
          buttonText={`Learn More About Us`}
        />

        <ContactFormSection
          projectName={'CuriousDemo'}
          design={ContactFormDesigns.HIGHLIGHTED || ''}
          image={['Person typing on a laptop']}
          mainText={`Connect with ${projectName} Team `}
          subTitle={`We're here to help! Reach out to us anytime, and our team will respond promptly to your inquiries.`}
        />
      </main>
      <WebSiteFooter projectName={'CuriousDemo'} />
    </div>
  );
}

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