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

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

  const faqs = [
    {
      question: 'How do I create a biolink page?',
      answer:
        'Creating a biolink page with ${projectName} is simple. Sign up, choose a template, and start adding your links. Customize the design to match your brand.',
    },
    {
      question: 'Can I track the performance of my links?',
      answer:
        'Yes, ${projectName} provides detailed analytics, allowing you to track visits, clicks, and referrers for each link on your page.',
    },
    {
      question: 'Is there a free version of ${projectName}?',
      answer:
        'Yes, we offer a free plan with basic features. You can upgrade to a premium plan for more advanced features and customization options.',
    },
    {
      question: 'How do I connect my custom domain?',
      answer:
        'To connect a custom domain, navigate to the domain settings in your account, follow the instructions, and verify your domain to activate it.',
    },
    {
      question: 'What support options are available?',
      answer:
        'We offer various support options, including a help center, community forums, and priority support for premium users. Contact us for any assistance.',
    },
    {
      question: 'Can I change my plan later?',
      answer:
        'Absolutely! You can upgrade or downgrade your plan at any time from your account settings. Changes will be reflected in your next billing cycle.',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Contact Us - Biolink SaaS`}</title>
        <meta
          name='description'
          content={`Get in touch with the Biolink SaaS team for any inquiries, support, or feedback. We're here to assist you with your biolink needs.`}
        />
      </Head>
      <WebSiteHeader projectName={'KevinHall'} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'KevinHall'}
          image={['Customer support team at work']}
          mainText={`Connect with ${projectName} Today`}
          subTitle={`Have questions or need assistance? Our team at ${projectName} is here to help you with all your biolink needs. Reach out to us anytime.`}
          design={HeroDesigns.IMAGE_LEFT || ''}
          buttonText={`Contact Us Now`}
        />

        <FaqSection
          projectName={'KevinHall'}
          design={FaqDesigns.TWO_COLUMN || ''}
          faqs={faqs}
          mainText={`Common Questions about ${projectName} `}
        />

        <ContactFormSection
          projectName={'KevinHall'}
          design={ContactFormDesigns.WITH_IMAGE || ''}
          image={['Person typing on a keyboard']}
          mainText={`Get in Touch with ${projectName} `}
          subTitle={`We're here to assist you with any questions or support you need. Contact us anytime, and our team at ${projectName} will respond promptly.`}
        />
      </main>
      <WebSiteFooter projectName={'KevinHall'} />
    </div>
  );
}

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