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

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

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

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 faqs = [
    {
      question: 'What is ${projectName} and how does it work?',
      answer:
        '${projectName} is a comprehensive ERP solution designed to streamline business operations. It integrates various functions like accounting, CRM, and inventory management into a single platform, making it easier to manage your business efficiently.',
    },
    {
      question: 'How can I customize ${projectName} for my business needs?',
      answer:
        '${projectName} offers a range of customization options, allowing you to tailor features and workflows to suit your specific business requirements. Our support team can assist you in setting up custom configurations.',
    },
    {
      question: 'Is there a mobile version of ${projectName}?',
      answer:
        'Yes, ${projectName} is accessible on mobile devices, providing you with the flexibility to manage your business on the go. The mobile version includes key features and a user-friendly interface.',
    },
    {
      question: 'What kind of support does ${projectName} offer?',
      answer:
        'We provide 24/7 customer support through email and chat. Our dedicated team is ready to assist you with any questions or issues you may encounter while using ${projectName}.',
    },
    {
      question: 'Can I integrate ${projectName} with other software?',
      answer:
        'Absolutely. ${projectName} supports integration with various third-party applications, enabling seamless data exchange and enhanced functionality. Our API documentation provides detailed guidance on setting up integrations.',
    },
    {
      question: 'How secure is my data with ${projectName}?',
      answer:
        'Data security is a top priority for us. ${projectName} employs advanced encryption and security protocols to ensure your data is protected at all times. Regular audits and updates are conducted to maintain security standards.',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Frequently Asked Questions About ${projectName}`}</title>
        <meta
          name='description'
          content={`Find answers to common questions about ${projectName}. Learn more about our features, pricing, and support options to make the most of your experience.`}
        />
      </Head>
      <WebSiteHeader projectName={'susatechnology'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'susatechnology'}
          image={['Person reading a FAQ document']}
          mainText={`Your ${projectName} Questions Answered Here`}
          subTitle={`Explore our comprehensive FAQ section to find answers to your questions about ${projectName}. Whether it's about features, pricing, or support, we've got you covered.`}
          design={HeroDesigns.TEXT_CENTER || ''}
          buttonText={`Explore FAQs`}
        />

        <FaqSection
          projectName={'susatechnology'}
          design={FaqDesigns.ACCORDION || ''}
          faqs={faqs}
          mainText={`Answers to Your ${projectName} Questions `}
        />

        <ContactFormSection
          projectName={'susatechnology'}
          design={ContactFormDesigns.WITH_IMAGE || ''}
          image={['Person typing on a laptop']}
          mainText={`Reach Out to ${projectName} Support `}
          subTitle={`Have more questions or need assistance? Contact us anytime, and our team will respond promptly to help you with your inquiries.`}
        />
      </main>
      <WebSiteFooter projectName={'susatechnology'} pages={pages} />
    </div>
  );
}

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