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

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

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 = 'CTPLERP';

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

  const features_points = [
    {
      name: 'Comprehensive HR Solutions',
      description:
        'Manage your workforce efficiently with our all-in-one HR services, from recruitment to retirement, ensuring compliance and employee satisfaction.',
      icon: 'mdiAccountGroup',
    },
    {
      name: 'Advanced IT Management',
      description:
        'Optimize your IT infrastructure with our cutting-edge solutions, providing seamless integration, security, and support for all your technological needs.',
      icon: 'mdiMonitor',
    },
    {
      name: 'Financial Efficiency',
      description:
        'Enhance your financial operations with our robust tools, offering real-time insights, automated processes, and strategic planning capabilities.',
      icon: 'mdiFinance',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Our Services - Rippling HRMS`}</title>
        <meta
          name='description'
          content={`Explore the range of services offered by Rippling HRMS, designed to streamline your HR, IT, and Finance operations with innovative solutions.`}
        />
      </Head>
      <WebSiteHeader projectName={'CTPLERP'} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'CTPLERP'}
          image={['Business transformation through technology']}
          mainText={`Transform Your Business with ${projectName}`}
          subTitle={`Discover how ${projectName} services can revolutionize your HR, IT, and Finance operations, driving efficiency and innovation across your organization.`}
          design={HeroDesigns.IMAGE_BG || ''}
          buttonText={`Explore Our Services`}
        />

        <FeaturesSection
          projectName={'CTPLERP'}
          image={['Illustration of diverse services']}
          withBg={0}
          features={features_points}
          mainText={`Explore ${projectName} Service Offerings`}
          subTitle={`Unlock the full potential of your business with ${projectName}'s comprehensive service suite, designed to streamline operations and enhance productivity.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS_DIVERSITY || ''}
        />

        <ContactFormSection
          projectName={'CTPLERP'}
          design={ContactFormDesigns.WITH_IMAGE || ''}
          image={['Customer support team assisting']}
          mainText={`Get in Touch with ${projectName} `}
          subTitle={`Reach out to us anytime for inquiries or support. Our team at ${projectName} is here to assist you promptly and effectively.`}
        />
      </main>
      <WebSiteFooter projectName={'CTPLERP'} />
    </div>
  );
}

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