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

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

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

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

  const features_points = [
    {
      name: 'Centralized Profile Links',
      description:
        "Access all of Philip Daineka's professional profiles in one convenient location. Simplify your networking and stay connected effortlessly.",
      icon: 'mdiLinkVariant',
    },
    {
      name: 'Real-Time Updates',
      description:
        'Stay informed with the latest updates from Philip Daineka. Our platform ensures you never miss important announcements or content.',
      icon: 'mdiUpdate',
    },
    {
      name: 'User-Friendly Interface',
      description:
        'Navigate through the platform with ease. Our intuitive design ensures a seamless experience for all users, regardless of technical expertise.',
      icon: 'mdiAccountCircle',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Philip Daineka's Linktree - Connect with Flatlogic CEO`}</title>
        <meta
          name='description'
          content={`Explore and connect with Philip Daineka, CEO of Flatlogic. Access links to his professional profiles and stay updated with his latest content.`}
        />
      </Head>
      <WebSiteHeader projectName={'philip'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'philip'}
          image={["Philip Daineka's professional profile links"]}
          mainText={`Connect with Philip Daineka, Flatlogic CEO`}
          subTitle={`Discover all of Philip Daineka's professional profiles and stay updated with his latest content. Connect with the Flatlogic CEO across various platforms.`}
          design={HeroDesigns.IMAGE_LEFT || ''}
          buttonText={`Explore Now`}
        />

        <FeaturesSection
          projectName={'philip'}
          image={['Showcasing key platform features']}
          withBg={0}
          features={features_points}
          mainText={`Explore ${projectName}'s Unique Features`}
          subTitle={`Discover the key features that make ${projectName} your go-to platform for connecting with Philip Daineka.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />

        <AboutUsSection
          projectName={'philip'}
          image={["Philip Daineka's inspiring journey"]}
          mainText={`Meet Philip Daineka, Flatlogic Visionary`}
          subTitle={`Discover the journey and vision of Philip Daineka, the driving force behind Flatlogic. Learn about his mission to innovate and connect through technology.`}
          design={AboutUsDesigns.IMAGE_RIGHT || ''}
          buttonText={`Learn More`}
        />

        <ContactFormSection
          projectName={'philip'}
          design={ContactFormDesigns.WITH_IMAGE || ''}
          image={['Contact form for quick inquiries']}
          mainText={`Get in Touch with Philip Daineka `}
          subTitle={`Reach out to Philip Daineka for inquiries or collaborations. We aim to respond within 24 hours to all messages received through ${projectName}.`}
        />
      </main>
      <WebSiteFooter projectName={'philip'} pages={pages} />
    </div>
  );
}

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