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

import FaqSection from '../../components/WebPageComponents/FaqComponent';

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

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 faqs = [
    {
      question: 'How can I contact Engedrones?',
      answer:
        'You can reach us through our contact form on the website or email us directly. Our team is ready to assist you with any inquiries.',
    },
    {
      question: 'What services does Engedrones provide?',
      answer:
        'Engedrones offers drone inspections, AI-driven data analysis, and comprehensive project reporting for public sanitation projects.',
    },
    {
      question: 'How does Engedrones ensure data security?',
      answer:
        'We implement robust security measures, including encryption and secure data storage, to protect your information and ensure privacy.',
    },
    {
      question: 'Can Engedrones integrate with my existing systems?',
      answer:
        'Yes, Engedrones can integrate with various project management and data analysis tools to streamline your workflow.',
    },
    {
      question: 'What is the response time for inquiries?',
      answer:
        'Our team aims to respond to all inquiries within 24 hours, ensuring prompt and efficient communication.',
    },
    {
      question: "Is there a trial period for Engedrones' services?",
      answer:
        'Yes, we offer a trial period for new clients to experience our services and see the value we provide firsthand.',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Engedrones - Contact Us`}</title>
        <meta
          name='description'
          content={`Get in touch with Engedrones for inquiries, support, or collaboration. Our team is here to assist you with all your public sanitation project needs.`}
        />
      </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={['Team discussing project details']}
          mainText={`Reach Out to Engedrones Today`}
          subTitle={`Connect with ${projectName} for all your inquiries, support, or collaboration needs. Our dedicated team is ready to assist you with precision and care.`}
          design={HeroDesigns.TEXT_CENTER || ''}
          buttonText={`Contact Us Now`}
        />

        <FaqSection
          projectName={'Gerenciador e Fiscalizador de Obras Copasa'}
          design={FaqDesigns.TWO_COLUMN || ''}
          faqs={faqs}
          mainText={`Common Questions about Engedrones `}
        />

        <ContactFormSection
          projectName={'Gerenciador e Fiscalizador de Obras Copasa'}
          design={ContactFormDesigns.SIMPLE_CLEAN || ''}
          image={['Person using a smartphone']}
          mainText={`Get in Touch with Engedrones `}
          subTitle={`For inquiries, support, or collaboration, contact ${projectName}. Our team is available to respond promptly and effectively.`}
        />
      </main>
      <WebSiteFooter
        projectName={'Gerenciador e Fiscalizador de Obras Copasa'}
      />
    </div>
  );
}

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