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

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

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

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>{`Innovator Nexus Blog`}</title>
        <meta
          name='description'
          content={`Stay updated with the latest insights, tips, and news from Innovator Nexus. Explore our blog for valuable information on school management and technology.`}
        />
      </Head>
      <WebSiteHeader projectName={'Nexus school management'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'Nexus school management'}
          image={['Open laptop with blog articles']}
          mainText={`Explore Insights with ${projectName} Blog`}
          subTitle={`Dive into the world of school management and technology with ${projectName}. Discover expert tips, industry news, and innovative ideas to enhance your educational journey.`}
          design={HeroDesigns.IMAGE_BG || ''}
          buttonText={`Read Our Blog`}
        />

        <FeaturesSection
          projectName={'Nexus school management'}
          image={['Feature icons on display']}
          withBg={1}
          features={features_points}
          mainText={`Discover Key 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 || ''}
        />
      </main>
      <WebSiteFooter projectName={'Nexus school management'} pages={pages} />
    </div>
  );
}

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