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

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

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

import TestimonialsSection from '../../components/WebPageComponents/TestimonialsComponent';

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

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

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

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

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

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

  const features_points = [
    {
      name: 'Comprehensive Course Management',
      description:
        'Easily create, organize, and manage courses with our intuitive tools. Enhance the learning experience with detailed syllabi and resource materials.',
      icon: 'mdiBookOpenPageVariant',
    },
    {
      name: 'Advanced Student Analytics',
      description:
        'Gain valuable insights into student performance and engagement. Use data-driven analytics to improve educational outcomes and tailor learning experiences.',
      icon: 'mdiChartLine',
    },
    {
      name: 'Seamless Communication Tools',
      description:
        'Facilitate effective communication between students and instructors with integrated discussion boards and messaging features. Enhance collaboration and engagement.',
      icon: 'mdiForum',
    },
  ];

  const testimonials = [
    {
      text: "${projectName} has revolutionized our approach to online education. The platform's features are intuitive and have significantly improved our course delivery.",
      company: 'EduTech Solutions',
      user_name: 'Anna Roberts, Director of Learning',
    },
    {
      text: "The analytics provided by ${projectName} are invaluable. We've been able to tailor our courses to better meet student needs, resulting in higher satisfaction rates.",
      company: 'Global Learning Institute',
      user_name: 'James Carter, Academic Advisor',
    },
    {
      text: 'Our instructors love the seamless communication tools. ${projectName} has made it easier for them to engage with students and foster a collaborative learning environment.',
      company: 'Bright Future Academy',
      user_name: 'Laura Smith, Senior Instructor',
    },
    {
      text: 'The course management system is top-notch. ${projectName} has streamlined our processes and allowed us to focus more on delivering quality education.',
      company: 'Innovative Education Hub',
      user_name: 'Michael Brown, Curriculum Developer',
    },
    {
      text: "We've seen a marked improvement in student engagement since adopting ${projectName}. The platform's user-friendly interface is a hit with both students and staff.",
      company: 'NextGen Learning Center',
      user_name: 'Emily Johnson, Program Coordinator',
    },
    {
      text: 'The support team at ${projectName} is exceptional. They are always ready to assist and ensure our experience with the platform is smooth and efficient.',
      company: 'Future Leaders Institute',
      user_name: 'David Lee, IT Support Specialist',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Our Services - ${projectName}`}</title>
        <meta
          name='description'
          content={`Explore the comprehensive services offered by ${projectName}. From course management to student engagement, discover how we can enhance your online education experience.`}
        />
      </Head>
      <WebSiteHeader projectName={'hello lo'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'hello lo'}
          image={['Diverse team collaborating on project']}
          mainText={`Unlock the Power of ${projectName} Services`}
          subTitle={`Discover how ${projectName} can transform your educational experience with our comprehensive suite of services. From course management to student engagement, we have you covered.`}
          design={HeroDesigns.IMAGE_BG || ''}
          buttonText={`Explore Our Services`}
        />

        <FeaturesSection
          projectName={'hello lo'}
          image={['Dashboard displaying key metrics']}
          withBg={0}
          features={features_points}
          mainText={`Explore ${projectName}'s Exceptional Features`}
          subTitle={`Discover the powerful features of ${projectName} designed to enhance your online education experience. From intuitive course management to insightful analytics, we offer it all.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />

        <TestimonialsSection
          projectName={'hello lo'}
          design={TestimonialsDesigns.HORIZONTAL_CAROUSEL || ''}
          testimonials={testimonials}
          mainText={`What Our Clients Say About ${projectName} `}
        />
      </main>
      <WebSiteFooter projectName={'hello lo'} pages={pages} />
    </div>
  );
}

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