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

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

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

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

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

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

  const features_points = [
    {
      name: 'Unified Platform',
      description:
        'Experience seamless integration across HR, IT, and Finance, eliminating silos and enhancing collaboration within your organization.',
      icon: 'mdiIntegration',
    },
    {
      name: 'Automated Workflows',
      description:
        'Automate routine tasks and processes, reducing manual effort and allowing your team to focus on strategic initiatives.',
      icon: 'mdiAutorenew',
    },
    {
      name: 'Global Compliance',
      description:
        'Stay compliant with local regulations worldwide, with built-in support for multi-country payroll and employment standards.',
      icon: 'mdiGavel',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`About Us - Rippling HRMS Blueprint`}</title>
        <meta
          name='description'
          content={`Discover the comprehensive blueprint for Rippling HRMS, detailing our mission, values, and the innovative features of our platform.`}
        />
      </Head>
      <WebSiteHeader projectName={'CTPLERP'} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'CTPLERP'}
          image={['Innovative HRMS platform interface']}
          mainText={`Explore the Future of HRMS with Rippling`}
          subTitle={`Discover how ${projectName} revolutionizes HR, IT, and Finance with a seamless, automated platform. Experience the power of a unified system designed for global efficiency.`}
          design={HeroDesigns.IMAGE_RIGHT || ''}
          buttonText={`Learn More`}
        />

        <AboutUsSection
          projectName={'CTPLERP'}
          image={['Team collaborating on HR solutions']}
          mainText={`Unleashing Potential with Rippling HRMS`}
          subTitle={`At ${projectName}, we are committed to transforming the way businesses manage their HR, IT, and Finance operations. Our platform is designed to streamline processes, enhance productivity, and drive innovation.`}
          design={AboutUsDesigns.IMAGE_LEFT || ''}
          buttonText={`Discover Our Vision`}
        />

        <FeaturesSection
          projectName={'CTPLERP'}
          image={['Illustration of integrated features']}
          withBg={0}
          features={features_points}
          mainText={`Discover Key Features of ${projectName}`}
          subTitle={`Explore the innovative features of ${projectName} that streamline HR, IT, and Finance operations, enhancing efficiency and productivity.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />
      </main>
      <WebSiteFooter projectName={'CTPLERP'} />
    </div>
  );
}

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