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 = 'Gerenciador e Fiscalizador de Obras Copasa';

  useEffect(() => {
    const darkElement = document.querySelector('body .dark');
    if (darkElement) {
      darkElement.classList.remove('dark');
    }
  }, []);

  const features_points = [
    {
      name: 'AI-Powered Image Analysis',
      description:
        'Utilize advanced AI algorithms to analyze drone-captured images, providing accurate and actionable insights for project management.',
      icon: 'mdiBrain',
    },
    {
      name: 'Real-Time Monitoring',
      description:
        'Keep track of project progress with real-time data and updates, ensuring timely interventions and decision-making.',
      icon: 'mdiClockFast',
    },
    {
      name: 'Comprehensive Reporting',
      description:
        'Generate detailed reports with ease, offering a clear overview of project status, compliance, and areas for improvement.',
      icon: 'mdiFileDocumentOutline',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Engedrones - Home`}</title>
        <meta
          name='description'
          content={`Welcome to Engedrones, your trusted partner in managing and inspecting public sanitation projects with cutting-edge drone technology and AI analysis.`}
        />
      </Head>
      <WebSiteHeader
        projectName={'Gerenciador e Fiscalizador de Obras Copasa'}
      />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'Gerenciador e Fiscalizador de Obras Copasa'}
          image={['Drone capturing construction site']}
          mainText={`Revolutionize Sanitation with Engedrones`}
          subTitle={`Experience the future of public sanitation management with ${projectName}. Harness the power of drone technology and AI for precise inspections and efficient project oversight.`}
          design={HeroDesigns.IMAGE_RIGHT || ''}
          buttonText={`Get Started Now`}
        />

        <FeaturesSection
          projectName={'Gerenciador e Fiscalizador de Obras Copasa'}
          image={['Drone inspecting construction site']}
          withBg={1}
          features={features_points}
          mainText={`Discover Engedrones' Cutting-Edge Features`}
          subTitle={`Explore the innovative features of ${projectName} that streamline sanitation project management and enhance efficiency.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />

        <AboutUsSection
          projectName={'Gerenciador e Fiscalizador de Obras Copasa'}
          image={['Team collaborating on project']}
          mainText={`Meet the Visionaries Behind Engedrones`}
          subTitle={`At ${projectName}, we are committed to revolutionizing public sanitation management through innovative drone technology and AI-driven solutions. Our team of experts is dedicated to delivering excellence and efficiency in every project.`}
          design={AboutUsDesigns.IMAGE_LEFT || ''}
          buttonText={`Learn More About Us`}
        />

        <ContactFormSection
          projectName={'Gerenciador e Fiscalizador de Obras Copasa'}
          design={ContactFormDesigns.WITH_IMAGE || ''}
          image={['Person typing on laptop']}
          mainText={`Get in Touch with Engedrones `}
          subTitle={`Reach out to ${projectName} for inquiries, support, or collaboration opportunities. Our team is here to assist you promptly and effectively.`}
        />
      </main>
      <WebSiteFooter
        projectName={'Gerenciador e Fiscalizador de Obras Copasa'}
      />
    </div>
  );
}

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