'use client';

import { useTranslator } from '@/contexts/TranslatorContext';
import HeroSection from '@/components/HeroSection/HeroSection';
import PricingCard from '@/components/SharedHosting/PricingCard';
import BackupsGrowSection from '@/components/Backups/BackupsGrowSection';
import Asks from '@/components/DataCenter/Asks/Asks';
import PlatformSupport from '@/components/Backups/PlatformSupport';
import WindowsKeyAdSection from '@/components/WindowsKeyAdSection';

const ServerManagementPage = () => {
  const { translations } = useTranslator();

  const heroTitle =
    translations?.['server_management']?.['hero']?.['title'] ||
    translations?.['server_management.hero.title'] ||
    translations['manageServers'] ||
    'إدارة الخوادم';
  const heroDescription =
    translations?.['server_management']?.['hero']?.['description'] ||
    translations?.['server_management.hero.description'] ||
    translations['letsManageForYou'] ||
    'دعنا ندير جميع خوادمك من أجلك';
  const heroPrimaryButton =
    translations?.['server_management']?.['hero']?.['primaryButton'] ||
    translations?.['server_management.hero.primaryButton'] ||
    translations['registerNowButton'] ||
    'التسجيل الآن';

  return (
    <div className='overflow-x-hidden'>
      <HeroSection
        title={heroTitle}
        description={heroDescription}
        primaryButtonText={heroPrimaryButton}
        imageLeft='/images/Hero/cloud-servers/left-server.svg'
        imageLeftClass='[translate:-10px_-180px] z-[999]'
        imageCenter='/images/Hero/cloud-servers/center-server.svg'
        imageCenterClass='[translate:-60px_-150px] z-[999]'
        imageRight='/images/Hero/cloud-servers/right-server.svg'
        imageRightClass='[translate:-40px_15px] z-[999]'
        centerIconSrc='/images/Hero/cloud-servers/center-icon.svg'
        centerIconX={680}
        centerIconY={595}
        centerIconWidth={140}
        centerIconHeight={140}
        centerIconSrcClass='z-[1000] animate-float'
        leftIconSrc='/images/Hero/cloud-servers/left-icon.svg'
        leftIconX={420}
        leftIconY={595}
        leftIconWidth={54}
        leftIconHeight={58}
        leftIconSrcClass='z-[1000] animate-float animate-float-delay-2'
        rightIconSrc='/images/Hero/cloud-servers/right-icon.svg'
        rightIconX={1022}
        rightIconY={595}
        rightIconWidth={54}
        rightIconHeight={58}
        rightIconSrcClass='z-[1000] animate-float animate-float-delay-1'
        mobileImage1Style={{ width: '40%' }}
      />
      <PricingCard titleKey='server_management.pricing_title' />
      <BackupsGrowSection sectionKey='server_management.growSection' />
      <PlatformSupport sectionKey='server_management.platformSupport' />
      <WindowsKeyAdSection />
      <Asks faqsKey='server_management.faqs' />
    </div>
  );
};

export default ServerManagementPage;
