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

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

import ContactFormSection from '../../components/WebPageComponents/ContactFormComponent';

import FaqSection from '../../components/WebPageComponents/FaqComponent';

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 faqs = [
    {
      question: 'How do I get started with ${projectName}?',
      answer:
        'To get started, sign up for a free trial on our website. Once registered, you can explore the features and see how ${projectName} can benefit your business.',
    },
    {
      question: 'What support options are available?',
      answer:
        'We offer 24/7 customer support via email and chat. Our team is ready to assist you with any questions or issues you may encounter.',
    },
    {
      question: 'Can I customize ${projectName} to fit my needs?',
      answer:
        'Yes, ${projectName} is highly customizable. You can tailor the features and interface to suit your specific business requirements.',
    },
    {
      question: 'Is my data secure with ${projectName}?',
      answer:
        'Absolutely. We use advanced encryption and security protocols to ensure your data is safe and protected at all times.',
    },
    {
      question: 'What happens after the free trial ends?',
      answer:
        'After the trial, you can choose a pricing plan that best fits your needs. Our team will assist you in transitioning to a paid plan smoothly.',
    },
    {
      question: 'Can I integrate ${projectName} with other tools?',
      answer:
        'Yes, ${projectName} supports integration with various third-party applications, allowing you to streamline your workflow and enhance productivity.',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Get in Touch with ${projectName}`}</title>
        <meta
          name='description'
          content={`Contact ${projectName} for any inquiries, support, or feedback. Our team is here to assist you with all your needs and ensure a seamless experience.`}
        />
      </Head>
      <WebSiteHeader projectName={'susatechnology'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'susatechnology'}
          image={['Customer service representative smiling']}
          mainText={`Connect with ${projectName} Today`}
          subTitle={`We're here to help! Reach out to ${projectName} for any questions, support, or feedback. Our dedicated team is ready to assist you.`}
          design={HeroDesigns.TEXT_CENTER || ''}
          buttonText={`Contact Us Now`}
        />

        <FaqSection
          projectName={'susatechnology'}
          design={FaqDesigns.TWO_COLUMN || ''}
          faqs={faqs}
          mainText={`Common Questions About ${projectName} `}
        />

        <ContactFormSection
          projectName={'susatechnology'}
          design={ContactFormDesigns.WITH_IMAGE || ''}
          image={['Person typing on a laptop']}
          mainText={`Get in Touch with ${projectName} `}
          subTitle={`Have questions or need assistance? Fill out the form below, and our team will get back to you promptly. We're here to help!`}
        />
      </main>
      <WebSiteFooter projectName={'susatechnology'} pages={pages} />
    </div>
  );
}

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