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

export default function WebSite() {
  const cardsStyle = useAppSelector((state) => state.style.cardsStyle);
  const bgColor = useAppSelector((state) => state.style.bgLayoutColor);
  const projectName = 'vidya plus';

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

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

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

  const features_points = [
    {
      name: 'Seamless Admissions',
      description:
        'Streamline the entire admission process with online applications, document uploads, and real-time status updates. Simplify student onboarding with ease.',
      icon: 'mdiAccountPlus',
    },
    {
      name: 'Efficient Fee Management',
      description:
        'Manage fee collection effortlessly with online payments, automated reminders, and detailed financial reports. Keep track of every transaction securely.',
      icon: 'mdiCashMultiple',
    },
    {
      name: 'Dynamic Class Promotions',
      description:
        'Automate class promotions and track student progress with comprehensive reports. Ensure smooth transitions and accurate record-keeping.',
      icon: 'mdiSchoolOutline',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Vidya Plus - Comprehensive College Management System`}</title>
        <meta
          name='description'
          content={`Discover Vidya Plus, a modern and dynamic college management application designed to streamline admissions, fee collection, class promotions, and more. Explore our features and get in touch today.`}
        />
      </Head>
      <WebSiteHeader projectName={'vidya plus'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'vidya plus'}
          image={['Modern college management interface']}
          mainText={`Transform Education with ${projectName} Today`}
          subTitle={`${projectName} revolutionizes college management with seamless admissions, efficient fee collection, and dynamic class promotions. Experience a modern, user-friendly platform designed for educational excellence.`}
          design={HeroDesigns.IMAGE_RIGHT || ''}
          buttonText={`Get Started Now`}
        />

        <FeaturesSection
          projectName={'vidya plus'}
          image={['Interactive dashboard with graphs']}
          withBg={0}
          features={features_points}
          mainText={`Explore ${projectName} Key Features`}
          subTitle={`Discover how ${projectName} simplifies college management with innovative features designed for efficiency and ease.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />

        <AboutUsSection
          projectName={'vidya plus'}
          image={['Team collaborating on innovative solutions']}
          mainText={`Empowering Education with ${projectName}`}
          subTitle={`At ${projectName}, we are dedicated to transforming the educational landscape with cutting-edge technology. Our mission is to provide colleges with a comprehensive management solution that enhances efficiency and fosters growth.`}
          design={AboutUsDesigns.IMAGE_LEFT || ''}
          buttonText={`Learn More About Us`}
        />

        <ContactFormSection
          projectName={'vidya plus'}
          design={ContactFormDesigns.WITH_IMAGE || ''}
          image={['Person typing on a laptop']}
          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={'vidya plus'} pages={pages} />
    </div>
  );
}

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