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

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

import FeaturesSection from '../../components/WebPageComponents/FeaturesComponent';

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');
    }
  }, []);

  const features_points = [
    {
      name: 'Intuitive Interface',
      description:
        'Navigate through an easy-to-use interface designed to simplify schema creation. No technical expertise required.',
      icon: 'mdiMonitor',
    },
    {
      name: 'Customizable Templates',
      description:
        'Choose from a variety of templates to kickstart your project. Tailor them to fit your specific needs effortlessly.',
      icon: 'mdiFormatListBulleted',
    },
    {
      name: 'Real-time Collaboration',
      description:
        'Work with your team in real-time, ensuring everyone is on the same page and enhancing productivity.',
      icon: 'mdiAccountGroup',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Build Your Own Schema with Flatlogic AI Architect`}</title>
        <meta
          name='description'
          content={`Discover how to build your own software schema effortlessly with Flatlogic AI Architect. Perfect for developers and businesses looking to streamline their software development process.`}
        />
      </Head>
      <WebSiteHeader projectName={'CuriousDemo'} />
      <main className={`flex-grow  ${bgColor}    rounded-none  `}>
        <HeroSection
          projectName={'CuriousDemo'}
          image={['Person designing software schema']}
          mainText={`Build Your Schema with Ease`}
          subTitle={`Unleash the power of ${projectName} to create your own software schema effortlessly. Perfect for developers and businesses aiming to streamline their development process.`}
          design={HeroDesigns.IMAGE_RIGHT || ''}
          buttonText={`Get Started Now`}
        />

        <FeaturesSection
          projectName={'CuriousDemo'}
          image={['Icons representing software features']}
          withBg={0}
          features={features_points}
          mainText={`Explore ${projectName} Key Features`}
          subTitle={`Discover the powerful features of ${projectName} that simplify schema creation and enhance your development process.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />

        <AboutUsSection
          projectName={'CuriousDemo'}
          image={['Team collaborating on project']}
          mainText={`Discover the Vision Behind ${projectName}`}
          subTitle={`At ${projectName}, we are committed to revolutionizing the way you create software schemas. Our mission is to empower developers and businesses with intuitive tools and seamless experiences.`}
          design={AboutUsDesigns.IMAGE_LEFT || ''}
          buttonText={`Learn More About Us`}
        />

        <ContactFormSection
          projectName={'CuriousDemo'}
          design={ContactFormDesigns.WITH_IMAGE || ''}
          image={['Person typing on a laptop']}
          mainText={`Get in Touch with ${projectName} `}
          subTitle={`Reach out to us anytime. Our team at ${projectName} is here 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>;
};
