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

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

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

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

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

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 = 'Asova';

  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: '/pricing',
      label: 'pricing',
    },

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

  const features_points = [
    {
      name: 'Seamless Property Management',
      description:
        'Effortlessly manage properties with our intuitive interface. Track maintenance, tenant agreements, and rental income all in one place.',
      icon: 'mdiHomeCityOutline',
    },
    {
      name: 'Advanced Project Planning',
      description:
        'Streamline project workflows with digital tools. Monitor progress, manage contracts, and ensure timely completion of development projects.',
      icon: 'mdiCalendarCheck',
    },
    {
      name: 'Real-Time GPS Tracking',
      description:
        'Enhance staff efficiency and safety with real-time location tracking. Optimize routes and ensure timely job completion.',
      icon: 'mdiMapMarkerPath',
    },
  ];

  const testimonials = [
    {
      text: "${projectName} has transformed our property management process. It's intuitive and efficient, saving us countless hours each week.",
      company: 'GreenLeaf Estates',
      user_name: 'John Doe, Property Manager',
    },
    {
      text: "As a developer, ${projectName} has streamlined our project planning and execution. It's a game-changer for our team.",
      company: 'BuildSmart Solutions',
      user_name: 'Jane Smith, Project Lead',
    },
    {
      text: "The GPS tracking feature in ${projectName} ensures our staff's safety and efficiency. It's an invaluable tool for our operations.",
      company: 'RouteMaster Services',
      user_name: 'Michael Brown, Operations Manager',
    },
    {
      text: 'With ${projectName}, managing tenant requests has never been easier. Our response time has improved significantly.',
      company: 'UrbanNest Rentals',
      user_name: 'Emily White, Tenant Relations Specialist',
    },
    {
      text: 'The seamless integration with Stripe has simplified our billing process. ${projectName} is a must-have for any trade business.',
      company: 'CraftPro Services',
      user_name: 'David Green, Finance Director',
    },
    {
      text: 'We love how customizable ${projectName} is. It adapts perfectly to our unique business needs.',
      company: 'InnovateBuild Inc.',
      user_name: 'Sarah Johnson, CEO',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Innovative Multi-Tenant SaaS Platform for Property Management and Trade Businesses`}</title>
        <meta
          name='description'
          content={`Discover our cutting-edge SaaS platform designed for property investors, developers, and trade business owners. Streamline operations with our intuitive tools, role-based access, and seamless integrations.`}
        />
      </Head>
      <WebSiteHeader projectName={'Asova'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'Asova'}
          image={['Modern cityscape with digital overlay']}
          mainText={`Revolutionize Property and Trade Management`}
          subTitle={`Experience seamless operations with ${projectName}. Empower property investors, developers, and trade businesses with our innovative SaaS platform.`}
          design={HeroDesigns.IMAGE_BG || ''}
          buttonText={`Get Started Today`}
        />

        <FeaturesSection
          projectName={'Asova'}
          image={['Icons representing diverse features']}
          withBg={0}
          features={features_points}
          mainText={`Explore ${projectName} Key Features`}
          subTitle={`Unlock the full potential of property and trade management with ${projectName}. Discover how our features can transform your business.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />

        <AboutUsSection
          projectName={'Asova'}
          image={['Team collaborating in modern office']}
          mainText={`Empowering Your Business with ${projectName}`}
          subTitle={`At ${projectName}, we are dedicated to revolutionizing property and trade management. Our mission is to provide innovative solutions that streamline operations and enhance efficiency for property investors, developers, and trade businesses.`}
          design={AboutUsDesigns.IMAGE_RIGHT || ''}
          buttonText={`Learn More About Us`}
        />

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

        <ContactFormSection
          projectName={'Asova'}
          design={ContactFormDesigns.WITH_IMAGE || ''}
          image={['Person typing on a laptop']}
          mainText={`Get in Touch with ${projectName} `}
          subTitle={`We're here to help! Reach out to us anytime, and our team will respond promptly to assist you with your needs.`}
        />
      </main>
      <WebSiteFooter projectName={'Asova'} pages={pages} />
    </div>
  );
}

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