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

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

import PricingSection from '../../components/WebPageComponents/PricingComponent';

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

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 = 'Patient Vault';

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

  const pricing_features = {
    standard: {
      features: [
        'Basic operational control',
        'Essential compliance tools',
        'Standard support',
      ],
      limited_features: ['Limited analytics', 'Basic reporting'],
    },
    premium: {
      features: [
        'Advanced operational control',
        'Comprehensive compliance tools',
        'Priority support',
      ],
      also_included: [
        'Enhanced analytics',
        'Customizable reporting',
        'Integration with third-party tools',
      ],
    },
    business: {
      features: [
        'Full operational control',
        'Complete compliance suite',
        'Dedicated account manager',
        '24/7 premium support',
        'Advanced analytics and reporting',
      ],
    },
  };

  const description = {
    standard:
      'The Standard plan is ideal for small clinics or individual practitioners looking to streamline basic operations and maintain essential compliance.',
    premium:
      'The Premium plan is perfect for small to medium-sized healthcare organizations seeking advanced features and enhanced support to optimize their operations.',
    business:
      'The Business plan is designed for large healthcare enterprises requiring comprehensive control, full compliance capabilities, and dedicated support.',
  };

  const faqs = [
    {
      question: 'What is PatientVault and how does it work?',
      answer:
        'PatientVault is a HIPAA-compliant SaaS platform designed to streamline healthcare operations, billing, and compliance. It offers real-time insights and tools to manage patient data efficiently.',
    },
    {
      question: 'What are the key features of PatientVault?',
      answer:
        'PatientVault provides operational control, compliance management, financial oversight, and growth insights. It includes features like real-time alerts, detailed dashboards, and customizable reports.',
    },
    {
      question: 'How does PatientVault ensure data security?',
      answer:
        'PatientVault employs advanced encryption, access controls, and audit trails to protect sensitive data. It complies with HIPAA regulations to ensure the highest level of security.',
    },
    {
      question: 'Can I customize the features in my plan?',
      answer:
        'Yes, PatientVault offers customizable features in the Premium and Business plans. You can tailor the platform to meet your specific organizational needs.',
    },
    {
      question: 'What kind of support does PatientVault offer?',
      answer:
        'PatientVault provides standard support for all plans, with priority and 24/7 support available in the Premium and Business plans, respectively.',
    },
    {
      question: 'Is there a free trial available for PatientVault?',
      answer:
        "Yes, PatientVault offers a free trial for new users to explore the platform's features and determine the best plan for their needs.",
    },
    {
      question: 'How does PatientVault handle compliance audits?',
      answer:
        'PatientVault automates compliance audits, providing detailed reports and tracking issues to ensure your organization remains audit-ready at all times.',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`PatientVault Pricing Plans`}</title>
        <meta
          name='description'
          content={`Explore our flexible pricing plans tailored to meet the needs of healthcare providers. Discover how PatientVault can fit your budget and enhance your operations.`}
        />
      </Head>
      <WebSiteHeader projectName={'Patient Vault'} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'Patient Vault'}
          image={['Pricing plans on a screen']}
          mainText={`Flexible Pricing for Every Need`}
          subTitle={`Discover the perfect plan for your healthcare organization with ${projectName}. Our pricing is designed to fit your budget while maximizing efficiency and compliance.`}
          design={HeroDesigns.IMAGE_BG || ''}
          buttonText={`View Plans`}
        />

        <PricingSection
          projectName={'Patient Vault'}
          withBg={1}
          features={pricing_features}
          description={description}
        />

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

        <ContactFormSection
          projectName={'Patient Vault'}
          design={ContactFormDesigns.HIGHLIGHTED || ''}
          image={['Person using a laptop']}
          mainText={`Reach Out to PatientVault `}
          subTitle={`Have questions about our pricing or plans? Contact us anytime, and our team will respond promptly to assist you.`}
        />
      </main>
      <WebSiteFooter projectName={'Patient Vault'} />
    </div>
  );
}

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