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

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

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 = 'Nexus school management';

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

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

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

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

    {
      href: '/blog',
      label: 'blog',
    },
  ];

  const faqs = [
    {
      question: 'What is ${projectName} and who can use it?',
      answer:
        '${projectName} is a comprehensive school management software designed for admins, teachers, students, and parents. It streamlines operations and enhances communication within educational institutions.',
    },
    {
      question: 'How does ${projectName} handle data security?',
      answer:
        '${projectName} employs advanced encryption and security protocols to protect user data. Regular audits and updates ensure that your information remains safe and confidential.',
    },
    {
      question: 'Can ${projectName} be customized for different schools?',
      answer:
        'Yes, ${projectName} offers customizable features to cater to the unique needs of each school. Schools can tailor dashboards, reports, and settings to fit their specific requirements.',
    },
    {
      question: 'Is there a mobile app for ${projectName}?',
      answer:
        'Yes, ${projectName} offers a mobile app for both iOS and Android devices, allowing users to access features and updates on the go, ensuring seamless connectivity.',
    },
    {
      question: 'What support options are available for ${projectName}?',
      answer:
        '${projectName} provides 24/7 customer support through email, chat, and phone. Our dedicated team is ready to assist with any queries or technical issues you may encounter.',
    },
    {
      question: 'How can I integrate ${projectName} with existing systems?',
      answer:
        '${projectName} supports integration with various third-party applications and systems. Our team can guide you through the process to ensure a smooth transition.',
    },
    {
      question: 'What are the pricing plans for ${projectName}?',
      answer:
        "${projectName} offers flexible pricing plans to accommodate schools of all sizes. Contact our sales team for a detailed quote tailored to your institution's needs.",
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Frequently Asked Questions - Innovator Nexus`}</title>
        <meta
          name='description'
          content={`Find answers to common questions about Innovator Nexus School Maintenance Software. Learn more about our features, pricing, and support options.`}
        />
      </Head>
      <WebSiteHeader projectName={'Nexus school management'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'Nexus school management'}
          image={['FAQ section with questions']}
          mainText={`Your Questions Answered by ${projectName}`}
          subTitle={`Explore our comprehensive FAQ section to find answers to your questions about ${projectName}. Learn more about our features, pricing, and support options.`}
          design={HeroDesigns.TEXT_CENTER || ''}
          buttonText={`Explore FAQs`}
        />

        <FaqSection
          projectName={'Nexus school management'}
          design={FaqDesigns.ACCORDION || ''}
          faqs={faqs}
          mainText={`Common Questions About ${projectName} `}
        />
      </main>
      <WebSiteFooter projectName={'Nexus school management'} pages={pages} />
    </div>
  );
}

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