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

import ContactFormSection from '../components/WebPageComponents/ContactFormComponent';

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

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

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

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 = 'Romocci Quadro';

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

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

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

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

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

  const features_points = [
    {
      name: 'Venue Management',
      description:
        'Effortlessly track and manage all available event spaces, ensuring you find the perfect venue for every occasion. Stay updated on availability and special features.',
      icon: 'mdiMapMarker',
    },
    {
      name: 'Vendor Coordination',
      description:
        'Organize and communicate with your preferred caterers, decorators, and entertainers. Keep their contact details and ratings at your fingertips for easy access.',
      icon: 'mdiAccountGroup',
    },
    {
      name: 'Schedule Planning',
      description:
        'Plan every detail of your event with precision. From vendor arrivals to the final dance, ensure everything runs smoothly and on time.',
      icon: 'mdiCalendarClock',
    },
  ];

  const testimonials = [
    {
      text: "${projectName} has revolutionized our event planning process. It's intuitive and saves us so much time!",
      company: 'Eventful Creations',
      user_name: 'Jane Doe, Event Coordinator',
    },
    {
      text: 'Thanks to ${projectName}, managing vendors and venues has never been easier. Highly recommend!',
      company: 'Celebration Masters',
      user_name: 'John Smith, Operations Manager',
    },
    {
      text: "Our team loves using ${projectName}. It's a game-changer for organizing large corporate events.",
      company: 'Corporate Gatherings Inc.',
      user_name: 'Emily Johnson, Senior Event Planner',
    },
    {
      text: 'The budgeting feature in ${projectName} is fantastic. It keeps our finances in check effortlessly.',
      company: 'Party Planners Co.',
      user_name: 'Michael Brown, Finance Controller',
    },
    {
      text: 'With ${projectName}, we can focus more on creativity and less on logistics. A must-have tool!',
      company: 'Creative Events Ltd.',
      user_name: 'Sarah Lee, Creative Director',
    },
    {
      text: 'The guest management feature is a lifesaver. ${projectName} makes tracking RSVPs a breeze.',
      company: 'Elegant Affairs',
      user_name: 'David Wilson, Guest Coordinator',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Effortless Event Management | Your All-in-One Solution`}</title>
        <meta
          name='description'
          content={`Discover our comprehensive event management app designed to streamline your event planning process. From venues to vendors, schedules to budgets, manage everything effortlessly in one place.`}
        />
      </Head>
      <WebSiteHeader projectName={'Romocci Quadro'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'Romocci Quadro'}
          image={['Event planning dashboard overview']}
          mainText={`Effortless Event Management with ${projectName}`}
          subTitle={`Transform your event planning with ${projectName}. Seamlessly manage venues, vendors, schedules, and budgets all in one place.`}
          design={HeroDesigns.IMAGE_RIGHT || ''}
          buttonText={`Get Started Now`}
        />

        <FeaturesSection
          projectName={'Romocci Quadro'}
          image={['Dashboard showcasing event features']}
          withBg={1}
          features={features_points}
          mainText={`Discover Key Features of ${projectName}`}
          subTitle={`Explore how ${projectName} simplifies event management with powerful features designed for seamless planning and execution.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />

        <AboutUsSection
          projectName={'Romocci Quadro'}
          image={['Team collaborating on event planning']}
          mainText={`Meet the Vision Behind ${projectName}`}
          subTitle={`At ${projectName}, we are passionate about transforming the way events are managed. Our mission is to provide a seamless, all-in-one solution that empowers organizers to create memorable experiences effortlessly.`}
          design={AboutUsDesigns.IMAGE_LEFT || ''}
          buttonText={`Learn More About Us`}
        />

        <TestimonialsSection
          projectName={'Romocci Quadro'}
          design={TestimonialsDesigns.MULTI_CARD_DISPLAY || ''}
          testimonials={testimonials}
          mainText={`What Our Users Say About ${projectName} `}
        />

        <ContactFormSection
          projectName={'Romocci Quadro'}
          design={ContactFormDesigns.WITH_IMAGE || ''}
          image={['Contact form on a laptop']}
          mainText={`Get in Touch with ${projectName} `}
          subTitle={`Reach out to us anytime. Our team is here to assist you with any inquiries or support you need. Expect a prompt response from ${projectName}.`}
        />
      </main>
      <WebSiteFooter projectName={'Romocci Quadro'} pages={pages} />
    </div>
  );
}

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