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,
  FaqDesigns,
} 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';

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 features_points = [
    {
      name: 'Comprehensive Dashboards',
      description:
        'Access tailored dashboards for admins, teachers, and students. Monitor activities, manage tasks, and stay informed with real-time data.',
      icon: 'mdiViewDashboard',
    },
    {
      name: 'Efficient Communication',
      description:
        'Facilitate seamless communication between teachers, students, and parents. Send messages, announcements, and updates effortlessly.',
      icon: 'mdiMessageText',
    },
    {
      name: 'Financial Management',
      description:
        'Manage school finances with ease. Track fees, process payments, and generate financial reports to ensure transparency and accuracy.',
      icon: 'mdiCurrencyUsd',
    },
  ];

  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>{`Innovator Nexus School Maintenance Software`}</title>
        <meta
          name='description'
          content={`Discover the Innovator Nexus School Maintenance Software, a comprehensive solution for school management. Explore features, learn about our mission, and get in touch for more information.`}
        />
      </Head>
      <WebSiteHeader projectName={'Nexus school management'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'Nexus school management'}
          image={['School dashboard interface preview']}
          mainText={`Revolutionize School Management with ${projectName}`}
          subTitle={`Experience seamless school operations with ${projectName}. Our software empowers admins, teachers, and parents to manage academic and financial tasks efficiently. Discover a new era of school management today.`}
          design={HeroDesigns.IMAGE_RIGHT || ''}
          buttonText={`Get Started Now`}
        />

        <FeaturesSection
          projectName={'Nexus school management'}
          image={['Dashboard showcasing key features']}
          withBg={1}
          features={features_points}
          mainText={`Explore ${projectName} Key Features`}
          subTitle={`Unlock the full potential of school management with ${projectName}. Streamline operations, enhance communication, and improve efficiency.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />

        <AboutUsSection
          projectName={'Nexus school management'}
          image={['Team collaborating on project']}
          mainText={`Discover the Vision Behind ${projectName}`}
          subTitle={`At ${projectName}, we are committed to transforming school management. Our mission is to empower educational institutions with innovative tools for seamless operations and enhanced learning experiences.`}
          design={AboutUsDesigns.IMAGE_LEFT || ''}
          buttonText={`Learn More About Us`}
        />

        <FaqSection
          projectName={'Nexus school management'}
          design={FaqDesigns.ACCORDION || ''}
          faqs={faqs}
          mainText={`Frequently Asked Questions about ${projectName} `}
        />

        <ContactFormSection
          projectName={'Nexus school management'}
          design={ContactFormDesigns.WITH_IMAGE || ''}
          image={['Contact form on a desk']}
          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 efficiently.`}
        />
      </main>
      <WebSiteFooter projectName={'Nexus school management'} pages={pages} />
    </div>
  );
}

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