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

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

import FeaturesSection from '../../components/WebPageComponents/FeaturesComponent';

import AboutUsSection from '../../components/WebPageComponents/AboutUsComponent';

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

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

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

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

    {
      href: '/faq',
      label: 'FAQ',
    },

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

  const features_points = [
    {
      name: 'Integrated Appointment Management',
      description:
        'Effortlessly schedule, reschedule, and manage appointments with real-time availability checks. Enhance patient satisfaction with automated reminders and conflict-free scheduling.',
      icon: 'mdiCalendarCheck',
    },
    {
      name: 'Comprehensive EMR System',
      description:
        'Access and update electronic medical records with ease. Utilize voice-to-text technology for quick documentation and ensure accurate patient data management.',
      icon: 'mdiFileDocumentEdit',
    },
    {
      name: 'Advanced Billing Solutions',
      description:
        'Automate billing processes with detailed invoices and VAT calculations. Seamlessly integrate with insurance systems for eligibility checks and pre-authorizations.',
      icon: 'mdiCashRegister',
    },
  ];

  const faqs = [
    {
      question: 'What services does ${projectName} offer?',
      answer:
        '${projectName} offers a range of services including patient management, appointment scheduling, electronic medical records, billing, and insurance integration to streamline healthcare operations.',
    },
    {
      question: 'How does ${projectName} improve patient care?',
      answer:
        'By centralizing patient information and automating administrative tasks, ${projectName} allows healthcare providers to focus more on patient care and less on paperwork.',
    },
    {
      question: 'Is ${projectName} compliant with local regulations?',
      answer:
        'Yes, ${projectName} is designed to comply with Saudi Arabian healthcare regulations, ensuring data security and privacy for all users.',
    },
    {
      question: 'Can ${projectName} be customized for my organization?',
      answer:
        'Absolutely, ${projectName} can be tailored to meet the specific needs of your healthcare organization, including custom workflows and integrations.',
    },
    {
      question: 'How do I get started with ${projectName}?',
      answer:
        'To get started, contact our team for a demo or sign up on our website to explore the features and benefits of ${projectName} for your healthcare organization.',
    },
  ];

  return (
    <div className='flex flex-col min-h-screen'>
      <Head>
        <title>{`Explore Our Comprehensive Healthcare Services`}</title>
        <meta
          name='description'
          content={`Learn about the diverse range of services offered by our multi-tenant healthcare application, designed to enhance patient care and streamline operations for healthcare providers in Saudi Arabia.`}
        />
      </Head>
      <WebSiteHeader projectName={'MediCore'} pages={pages} />
      <main className={`flex-grow    bg-white  rounded-none  `}>
        <HeroSection
          projectName={'MediCore'}
          image={['Doctors collaborating on patient care']}
          mainText={`Discover ${projectName} Healthcare Services`}
          subTitle={`Explore the comprehensive services offered by ${projectName} to streamline healthcare operations and enhance patient care. Our solutions are tailored to meet the unique needs of healthcare providers in Saudi Arabia.`}
          design={HeroDesigns.IMAGE_LEFT || ''}
          buttonText={`Explore Our Services`}
        />

        <FeaturesSection
          projectName={'MediCore'}
          image={['Healthcare professionals using technology']}
          withBg={1}
          features={features_points}
          mainText={`Unleash the Power of ${projectName}`}
          subTitle={`Discover the key features of ${projectName} that transform healthcare management, ensuring efficiency and compliance for providers in Saudi Arabia.`}
          design={FeaturesDesigns.CARDS_GRID_WITH_ICONS || ''}
        />

        <AboutUsSection
          projectName={'MediCore'}
          image={['Team discussing healthcare innovations']}
          mainText={`Transforming Healthcare with ${projectName}`}
          subTitle={`At ${projectName}, we are committed to revolutionizing healthcare management in Saudi Arabia. Our innovative solutions are designed to streamline operations, enhance patient care, and ensure compliance with local standards.`}
          design={AboutUsDesigns.IMAGE_RIGHT || ''}
          buttonText={`Discover Our Mission`}
        />

        <FaqSection
          projectName={'MediCore'}
          design={FaqDesigns.TWO_COLUMN || ''}
          faqs={faqs}
          mainText={`${projectName} Services FAQ `}
        />
      </main>
      <WebSiteFooter projectName={'MediCore'} pages={pages} />
    </div>
  );
}

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