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

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

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

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

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

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

  const features_points = [
    {
      name: 'Integrated Financial Solutions',
      description:
        'Manage your finances effortlessly with our integrated solutions, offering real-time insights and automated processes to keep your business on track.',
      icon: 'mdiCurrencyUsd',
    },
    {
      name: 'Customer Relationship Management',
      description:
        'Enhance customer interactions with our CRM tools, designed to improve engagement, track leads, and boost sales performance.',
      icon: 'mdiAccountGroup',
    },
    {
      name: 'Advanced Inventory Management',
      description:
        'Optimize your inventory with our advanced management system, ensuring accurate stock levels and efficient supply chain operations.',
      icon: 'mdiWarehouse',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Explore Our Comprehensive Services`}</title>
        <meta
          name='description'
          content={`Discover the range of services offered by ${projectName}, designed to enhance your business operations and drive growth. From financial management to CRM solutions, we have you covered.`}
        />
      </Head>
      <WebSiteHeader projectName={'susatechnology'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'susatechnology'}
          image={['Team collaborating on a project']}
          mainText={`Elevate Your Business with ${projectName} Services`}
          subTitle={`Explore the diverse range of services offered by ${projectName}, tailored to optimize your business processes and drive success. From financial management to CRM solutions, we provide the tools you need to excel.`}
          design={HeroDesigns.IMAGE_LEFT || ''}
          buttonText={`Discover Our Services`}
        />

        <FeaturesSection
          projectName={'susatechnology'}
          image={['Business team discussing strategy']}
          withBg={0}
          features={features_points}
          mainText={`Discover the Power of ${projectName} Services`}
          subTitle={`Unlock the full potential of your business with our comprehensive service offerings. ${projectName} is designed to streamline operations and enhance productivity.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />

        <AboutUsSection
          projectName={'susatechnology'}
          image={['Team collaborating in office']}
          mainText={`Meet the Visionaries Behind ${projectName}`}
          subTitle={`At ${projectName}, we are committed to delivering innovative solutions that empower businesses to thrive. Our team of experts is dedicated to providing exceptional service and support.`}
          design={AboutUsDesigns.IMAGE_RIGHT || ''}
          buttonText={`Learn More About Us`}
        />

        <ContactFormSection
          projectName={'susatechnology'}
          design={ContactFormDesigns.HIGHLIGHTED || ''}
          image={['Person typing on a laptop']}
          mainText={`Connect with ${projectName} Today `}
          subTitle={`We're here to help! Reach out to us anytime for inquiries or support. Our team at ${projectName} is ready to assist you promptly.`}
        />
      </main>
      <WebSiteFooter projectName={'susatechnology'} pages={pages} />
    </div>
  );
}

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