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

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

import AboutUsSection from '../components/WebPageComponents/AboutUsComponent';

import FeaturesSection from '../components/WebPageComponents/FeaturesComponent';

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 = '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: 'Real-Time Analytics',
      description:
        'Gain insights into school operations with real-time analytics. Track student performance, attendance, and financial data to make informed decisions.',
      icon: 'mdiChartLine',
    },
    {
      name: 'Seamless Communication',
      description:
        'Facilitate effective communication between teachers, students, and parents. Send messages, announcements, and updates with ease.',
      icon: 'mdiMessageTextOutline',
    },
    {
      name: 'Customizable Dashboards',
      description:
        'Tailor dashboards to meet the unique needs of your school. Customize views for admins, teachers, and students to streamline daily tasks.',
      icon: 'mdiViewDashboardOutline',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`About Innovator Nexus School Maintenance Software`}</title>
        <meta
          name='description'
          content={`Learn more about Innovator Nexus School Maintenance Software, our mission, vision, and the innovative features that make us a leader in school management solutions.`}
        />
      </Head>
      <WebSiteHeader projectName={'Nexus school management'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'Nexus school management'}
          image={['Team brainstorming session']}
          mainText={`Unveiling the Vision of ${projectName}`}
          subTitle={`Discover the story behind ${projectName}, our commitment to revolutionizing school management, and the values that drive us forward.`}
          design={HeroDesigns.IMAGE_BG || ''}
          buttonText={`Explore Our Journey`}
        />

        <AboutUsSection
          projectName={'Nexus school management'}
          image={['Team collaborating in office']}
          mainText={`The Heartbeat of ${projectName}`}
          subTitle={`At ${projectName}, we are driven by a passion for innovation and excellence in school management. Our team is dedicated to creating solutions that empower educational institutions worldwide.`}
          design={AboutUsDesigns.IMAGE_RIGHT || ''}
          buttonText={`Meet Our Team`}
        />

        <FeaturesSection
          projectName={'Nexus school management'}
          image={['Feature icons on display']}
          withBg={0}
          features={features_points}
          mainText={`Core Features of ${projectName}`}
          subTitle={`Explore the innovative features that make ${projectName} a leader in school management solutions, designed to enhance efficiency and communication.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />

        <ContactFormSection
          projectName={'Nexus school management'}
          design={ContactFormDesigns.HIGHLIGHTED || ''}
          image={['Contact form on screen']}
          mainText={`Connect with ${projectName} Today `}
          subTitle={`We're here to assist you with any inquiries or support needs. Reach out to ${projectName} and expect a prompt response from our dedicated team.`}
        />
      </main>
      <WebSiteFooter projectName={'Nexus school management'} pages={pages} />
    </div>
  );
}

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