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

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

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

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

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 = 'app for Allison';

  useEffect(() => {
    const darkElement = document.querySelector('body .dark');
    if (darkElement) {
      darkElement.classList.remove('dark');
    }
  }, []);
  const pages = [
    {
      href: '/home',
      label: 'home',
    },

    {
      href: '/about',
      label: 'about',
    },

    {
      href: '/services',
      label: 'services',
    },

    {
      href: '/contact',
      label: 'contact',
    },

    {
      href: '/faq',
      label: 'FAQ',
    },
  ];

  const features_points = [
    {
      name: 'Intuitive Dashboard',
      description:
        'Navigate through a user-friendly dashboard that provides a comprehensive overview of your recruitment activities. Stay organized and informed with real-time updates.',
      icon: 'mdiViewDashboard',
    },
    {
      name: 'Seamless Integration',
      description:
        'Easily integrate ${projectName} with your existing HR tools and platforms. Enhance your workflow without disrupting your current processes.',
      icon: 'mdiPuzzleOutline',
    },
    {
      name: 'Data-Driven Insights',
      description:
        'Leverage powerful analytics to gain insights into your recruitment strategies. Make informed decisions with data at your fingertips.',
      icon: 'mdiChartLine',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`About Us - Learn More About ${projectName}`}</title>
        <meta
          name='description'
          content={`Discover the mission, values, and team behind ${projectName}. Learn how our innovative recruitment platform is transforming the hiring process for businesses worldwide.`}
        />
      </Head>
      <WebSiteHeader projectName={'app for Allison'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'app for Allison'}
          image={['Team brainstorming in modern office']}
          mainText={`Meet the Visionaries Behind ${projectName}`}
          subTitle={`Explore the story, mission, and values that drive ${projectName}. Discover how our dedicated team is revolutionizing the recruitment industry with innovative solutions.`}
          design={HeroDesigns.IMAGE_BG || ''}
          buttonText={`Discover Our Story`}
        />

        <AboutUsSection
          projectName={'app for Allison'}
          image={['Diverse team collaborating happily']}
          mainText={`Our Journey with ${projectName}`}
          subTitle={`At ${projectName}, we are committed to transforming the recruitment landscape. Our mission is to connect businesses with the best talent through innovative technology and a dedicated team.`}
          design={AboutUsDesigns.IMAGE_LEFT || ''}
          buttonText={`Learn More About Us`}
        />

        <FeaturesSection
          projectName={'app for Allison'}
          image={['Dashboard showcasing key features']}
          withBg={0}
          features={features_points}
          mainText={`Explore ${projectName} Core Features`}
          subTitle={`Discover how ${projectName} empowers your recruitment process with cutting-edge features designed for efficiency and success.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />

        <ContactFormSection
          projectName={'app for Allison'}
          design={ContactFormDesigns.HIGHLIGHTED || ''}
          image={['Person typing on a laptop']}
          mainText={`Connect with ${projectName} Today `}
          subTitle={`Have questions or need assistance? Reach out to us anytime, and our team at ${projectName} will respond promptly to support your needs.`}
        />
      </main>
      <WebSiteFooter projectName={'app for Allison'} pages={pages} />
    </div>
  );
}

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