'use client';
import { CheckCircle } from 'lucide-react';
import { useTranslator } from '@/contexts/TranslatorContext';

const WhatMotivates = () => {
  const { translations, dir } = useTranslator();

  return (
    <section className='w-full py-8 md:py-14 bg-white'>
      <div
        className='container grid items-center gap-8 px-4 md:grid-cols-2 md:px-6 lg:gap-12'
        dir={dir} // Set text direction dynamically
      >
        {/* Left Column: Illustration */}
        <div className='flex justify-center md:order-1'>
          <img
            src='/images/why-register-ly1.png'
            width={600}
            height={400}
            alt={translations.domain_illustration_alt || 'Domain illustration'}
            className='mx-auto aspect-[3/2] overflow-hidden object-contain'
          />
        </div>

        {/* Right Column: Text Content */}
        <div
          className={`flex flex-col items-${
            dir === 'rtl' ? 'end text-right' : 'start text-left'
          } space-y-6 md:order-2`}>
          <h2 className='text-3xl font-bold tracking-tight sm:text-4xl md:text-5xl'>
            {translations.motivates_title ||
              'What Motivates You to Register a Domain Name?'}
          </h2>
          <p className='max-w-[600px] text-gray-600 md:text-xl/relaxed lg:text-base/relaxed xl:text-xl/relaxed'>
            {translations.motivates_description ||
              'As the official international domain name for Libya, the .sa extension represents your local business presence, reinforcing your commercial identity, supporting national business activities, and helping you reach your geographically targeted audience through:'}
          </p>
          <div className='grid gap-4 w-full'>
            <div className='flex items-start gap-3'>
              <CheckCircle
                className={`h-5 w-5 flex-shrink-0 text-blue-600 mt-1 ${
                  dir === 'rtl' ? 'ml-3' : 'mr-3'
                }`}
              />
              <p className='text-gray-700'>
                {translations.motivates_point_1 ||
                  'Building trust with local customers by using a national domain name recognized by most of them.'}
              </p>
            </div>
            <div className='flex items-start gap-3'>
              <CheckCircle
                className={`h-5 w-5 flex-shrink-0 text-blue-600 mt-1 ${
                  dir === 'rtl' ? 'ml-3' : 'mr-3'
                }`}
              />
              <p className='text-gray-700'>
                {translations.motivates_point_2 ||
                  'Enabling search engines to easily identify the geographical location of your business.'}
              </p>
            </div>
          </div>
        </div>
      </div>
    </section>
  );
};

export default WhatMotivates;
