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

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

import ContactFormSection from '../../components/WebPageComponents/ContactFormComponent';

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

export default function WebSite() {
  const cardsStyle = useAppSelector((state) => state.style.cardsStyle);
  const bgColor = useAppSelector((state) => state.style.bgLayoutColor);
  const projectName = 'Patient Vault';

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

  const faqs = [
    {
      question: 'How do I get started with PatientVault?',
      answer:
        "To get started, sign up for a free trial on our website. Once registered, you can explore the platform's features and choose the plan that best suits your needs.",
    },
    {
      question: 'What support options are available?',
      answer:
        'PatientVault offers standard support for all users, with priority support available for Premium and Business plans. Our team is ready to assist you with any inquiries.',
    },
    {
      question: 'Is my data secure with PatientVault?',
      answer:
        'Yes, PatientVault employs advanced encryption and access controls to ensure your data is secure. We comply with HIPAA regulations to protect sensitive information.',
    },
    {
      question: 'Can I customize the platform to fit my needs?',
      answer:
        'Absolutely! PatientVault offers customizable features in the Premium and Business plans, allowing you to tailor the platform to your specific requirements.',
    },
    {
      question: 'What happens after the free trial ends?',
      answer:
        'After the free trial, you can choose a plan that fits your needs. If you decide not to continue, your account will be deactivated, but you can reactivate it anytime.',
    },
    {
      question: 'How does PatientVault handle compliance?',
      answer:
        'PatientVault automates compliance audits and provides detailed reports to ensure your organization remains compliant with industry standards.',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Contact PatientVault Support`}</title>
        <meta
          name='description'
          content={`Get in touch with PatientVault for any inquiries or support. Our team is here to assist you with all your needs.`}
        />
      </Head>
      <WebSiteHeader projectName={'Patient Vault'} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'Patient Vault'}
          image={['Customer support team assisting clients']}
          mainText={`Connect with PatientVault Support Team`}
          subTitle={`We're here to help with any questions or support you need. Reach out to ${projectName} and let us assist you in optimizing your healthcare management.`}
          design={HeroDesigns.IMAGE_LEFT || ''}
          buttonText={`Contact Us Now`}
        />

        <FaqSection
          projectName={'Patient Vault'}
          design={FaqDesigns.TWO_COLUMN || ''}
          faqs={faqs}
          mainText={`Common Questions About PatientVault `}
        />

        <ContactFormSection
          projectName={'Patient Vault'}
          design={ContactFormDesigns.SIMPLE_CLEAN || ''}
          image={['Person filling out contact form']}
          mainText={`Get in Touch with PatientVault `}
          subTitle={`Have questions or need assistance? Contact us anytime, and our team at ${projectName} will respond promptly to support your needs.`}
        />
      </main>
      <WebSiteFooter projectName={'Patient Vault'} />
    </div>
  );
}

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