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

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

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

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

  const features_points = [
    {
      name: 'Real-Time Operational Control',
      description:
        'Monitor system health and receive instant alerts to ensure seamless operations. Take quick actions to resolve issues promptly.',
      icon: 'mdiMonitor',
    },
    {
      name: 'Comprehensive Compliance Management',
      description:
        'Stay compliant with HIPAA regulations through automated audits and detailed compliance reports. Mitigate risks effectively.',
      icon: 'mdiLock',
    },
    {
      name: 'Strategic Financial Oversight',
      description:
        'Gain insights into financial growth and revenue trends. Plan strategically with detailed financial dashboards and reports.',
      icon: 'mdiChartLine',
    },
  ];

  const testimonials = [
    {
      text: "PatientVault has transformed our operations, making compliance and management seamless. It's a game-changer for our clinic!",
      company: 'HealthFirst Clinic',
      user_name: 'Dr. Emily Carter, Chief Medical Officer',
    },
    {
      text: 'The intuitive interface and real-time insights have significantly improved our decision-making processes. Highly recommend!',
      company: 'Wellness Partners',
      user_name: 'John Doe, Operations Manager',
    },
    {
      text: "PatientVault's compliance features have given us peace of mind, knowing we're always audit-ready. A must-have for any healthcare provider.",
      company: 'CarePlus Health',
      user_name: 'Sarah Johnson, Compliance Officer',
    },
    {
      text: 'Our billing and revenue tracking have never been more efficient. PatientVault is an invaluable tool for our finance team.',
      company: 'MediCore Solutions',
      user_name: 'Michael Smith, Finance Director',
    },
    {
      text: 'The support team at PatientVault is exceptional. They helped us integrate seamlessly and are always there when we need them.',
      company: 'LifeCare Group',
      user_name: 'Jessica Brown, IT Manager',
    },
    {
      text: "PatientVault's growth insights have allowed us to expand strategically and effectively. It's a vital part of our success.",
      company: 'FutureHealth Inc.',
      user_name: 'David Lee, Growth Strategist',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`PatientVault - Your Comprehensive HIPAA-Compliant SaaS Solution`}</title>
        <meta
          name='description'
          content={`Discover PatientVault, the ultimate HIPAA-compliant SaaS platform for managing medical distribution, billing, compliance, and more. Explore our features and see how we can streamline your operations.`}
        />
      </Head>
      <WebSiteHeader projectName={'Patient Vault'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'Patient Vault'}
          image={['Healthcare professionals collaborating efficiently']}
          mainText={`Transform Healthcare with PatientVault Today`}
          subTitle={`Experience seamless medical management with PatientVault, the HIPAA-compliant platform designed to streamline operations, billing, and compliance. Empower your team with real-time insights and strategic oversight.`}
          design={HeroDesigns.IMAGE_RIGHT || ''}
          buttonText={`Get Started Now`}
        />

        <FeaturesSection
          projectName={'Patient Vault'}
          image={['Dashboard showcasing healthcare analytics']}
          withBg={0}
          features={features_points}
          mainText={`Explore PatientVault's Key Features`}
          subTitle={`Discover how ${projectName} enhances healthcare management with cutting-edge features designed for efficiency and compliance.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />

        <AboutUsSection
          projectName={'Patient Vault'}
          image={['Team collaborating on healthcare solutions']}
          mainText={`Empowering Healthcare with PatientVault`}
          subTitle={`At ${projectName}, we are dedicated to revolutionizing healthcare management. Our platform ensures seamless operations, compliance, and growth for medical institutions worldwide.`}
          design={AboutUsDesigns.IMAGE_LEFT || ''}
          buttonText={`Learn More About Us`}
        />

        <TestimonialsSection
          projectName={'Patient Vault'}
          design={TestimonialsDesigns.MULTI_CARD_DISPLAY || ''}
          testimonials={testimonials}
          mainText={`What Our Clients Say About PatientVault `}
        />

        <ContactFormSection
          projectName={'Patient Vault'}
          design={ContactFormDesigns.WITH_IMAGE || ''}
          image={['Person typing on a laptop']}
          mainText={`Get in Touch with PatientVault `}
          subTitle={`Reach out to us anytime for inquiries or support. Our team at ${projectName} is here to assist you promptly and efficiently.`}
        />
      </main>
      <WebSiteFooter projectName={'Patient Vault'} pages={pages} />
    </div>
  );
}

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