'use client';

import { useTranslator } from '@/contexts/TranslatorContext';
import { motion } from 'framer-motion';
import React from 'react';

const logoAnimations = ['animate-icon-pulse', 'animate-icon-pulse animate-icon-pulse-delay-1', 'animate-icon-pulse animate-icon-pulse-delay-2', 'animate-icon-pulse animate-icon-pulse-slow', 'animate-icon-pulse animate-icon-pulse-delay-1'];

const ImageSection = () => {
  let { translations } = useTranslator();
  const title = translations?.security_page?.partners?.title || translations['AreYouIntrested'];
  return (
    <div className='container mx-auto mt-12'>
      {/* النص - أنيميشن المحتوى */}
      <motion.p
        className='text-center text-lg'
        initial={{ opacity: 0, y: 20 }}
        whileInView={{ opacity: 1, y: 0, transition: { duration: 0.5, ease: 'easeOut' } }}
        viewport={{ once: true }}>
        {title}
      </motion.p>

      {/* الشعارات - أجسام تطفو */}
      <motion.div
        className='flex flex-wrap justify-center mt-12 gap-6'
        initial={{ opacity: 0, y: 24 }}
        whileInView={{ opacity: 1, y: 0, transition: { duration: 0.5, delay: 0.1, ease: 'easeOut' } }}
        viewport={{ once: true }}>
        <img
          alt='شعار شريك'
          src='/images/Group%202309-sk_OY7Jm.svg'
          className={`max-h-12 sm:max-h-16 ${logoAnimations[0]}`}
        />
        <img
          alt='شعار شريك'
          src="data:image/svg+xml,%3csvg%20width='239'%20height='72'%20viewBox='0%200%20239%2072'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M110.175%2035.4296C110.175%2042.3526%20105.897%2045.6139%20100.638%2045.6139H97.415V41.5006H100.44C103.663%2041.5006%20105.768%2039.8031%20105.768%2035.4942C105.768%2031.248%20103.729%2029.0963%20100.309%2029.0963C97.0208%2029.0963%2094.6522%2031.1197%2094.6522%2035.4287V52.8H90.246V25.441H94.6522V27.7911H95.3096C95.9962%2026.8807%2096.8912%2026.1454%2097.9205%2025.6459C98.9499%2025.1464%20100.084%2024.8971%20101.23%2024.9185C106.097%2024.9185%20110.175%2028.4437%20110.175%2035.4296ZM81.0375%2033.6674L78.0784%2033.4062C75.7767%2033.2105%2074.5269%2032.5569%2074.5269%2031.2517C74.5269%2029.6825%2076.1078%2028.7705%2078.3397%2028.7705C80.6414%2028.7705%2082.1526%2029.8782%2082.2865%2031.3819H86.5643C86.3671%2027.4643%2083.341%2025.0496%2078.4085%2025.0496C73.476%2025.0496%2070.1216%2027.6609%2070.1216%2031.4474C70.1216%2034.6468%2072.1601%2036.6701%2076.7644%2037.128L79.7895%2037.3892C81.6308%2037.5859%2082.8156%2037.9117%2082.8156%2039.6739C82.8156%2041.2431%2081.6996%2042.3508%2078.6716%2042.3508C75.9087%2042.3508%2074.5278%2041.1102%2074.0675%2039.4135H69.4632C69.9282%2043.1982%2073.1459%2046.2037%2078.6698%2046.2037C83.8655%2046.2037%2087.2199%2043.4612%2087.2199%2039.4791C87.2199%2035.8228%2084.8522%2034.0606%2081.0375%2033.6693M127.342%2039.3489C126.917%2040.2262%20126.242%2040.9602%20125.4%2041.4593C124.558%2041.9584%20123.586%2042.2007%20122.607%2042.156C119.384%2042.156%20116.95%2040.0671%20116.95%2035.5625C116.95%2031.2535%20119.186%2028.8379%20122.673%2028.8379C125.764%2028.8379%20127.54%2030.6655%20127.671%2033.4735H119.713V36.672H132.012V34.5831C132.012%2028.7677%20128.133%2024.9831%20122.607%2024.9831C117.476%2024.9831%20112.544%2028.4428%20112.544%2035.5588C112.544%2042.6748%20117.472%2046.1354%20122.607%2046.1354C124.677%2046.2188%20126.713%2045.5879%20128.367%2044.3501C130.022%2043.1122%20131.194%2041.3437%20131.683%2039.3453L127.342%2039.3489ZM57.4909%2024.9212C52.6235%2024.9212%2049.0059%2027.4025%2048.6116%2031.2536H53.347C53.6762%2029.8173%2054.9912%2028.7723%2057.4909%2028.7723C60.7142%2028.7723%2061.7687%2030.4699%2061.7687%2032.4942V39.4173C61.034%2040.317%2060.114%2041.0505%2059.0703%2041.5684C58.0266%2042.0863%2056.8834%2042.3766%2055.7174%2042.42C53.5469%2042.42%2052.0348%2041.3751%2052.0348%2039.4819C52.0348%2037.6542%2053.2186%2036.5446%2055.5203%2036.5446H59.0718V33.3453H55.3882C50.3237%2033.3453%2047.4956%2035.8265%2047.4956%2039.6775C47.4956%2043.2683%2050.2577%2046.0098%2054.7308%2046.0098C57.0429%2045.9767%2059.2816%2045.1993%2061.1103%2043.7945H61.7678V45.492H66.1739V32.1655C66.1739%2027.1385%2062.7545%2024.9185%2057.4918%2024.9185M27.4336%2045.6139H31.8398V18H27.4336V45.6139ZM46.0477%2025.441H40.6539L34.2084%2033.8631V36.4745L40.8511%2045.6129H46.31L38.5494%2035.1693L46.0477%2025.441ZM206.139%2025.441L202.521%2033.4062C201.715%2035.0429%20201.055%2036.7467%20200.548%2038.4978H199.89C199.372%2036.762%20198.69%2035.0788%20197.852%2033.4708L194.299%2025.44H189.432L197.982%2043.5895L193.773%2052.728H198.509L211.137%2025.4381L206.139%2025.441ZM188.376%2025.441H182.983L176.537%2033.8631V36.4745L183.181%2045.6129H188.64L180.879%2035.1674L188.376%2025.441ZM160.686%2033.6674L157.727%2033.4062C155.424%2033.2105%20154.174%2032.5569%20154.174%2031.2517C154.174%2029.6825%20155.755%2028.7705%20157.987%2028.7705C160.289%2028.7705%20161.8%2029.8782%20161.934%2031.3819H166.212C166.015%2027.4643%20162.989%2025.0496%20158.057%2025.0496C153.124%2025.0496%20149.769%2027.6609%20149.769%2031.4474C149.769%2034.6468%20151.809%2036.6701%20156.413%2037.128L159.438%2037.3892C161.279%2037.5859%20162.463%2037.9117%20162.463%2039.6739C162.463%2041.2431%20161.347%2042.3508%20158.319%2042.3508C155.557%2042.3508%20154.175%2041.1102%20153.716%2039.4135H149.112C149.577%2043.1982%20152.795%2046.2037%20158.318%2046.2037C163.514%2046.2037%20166.874%2043.4612%20166.874%2039.4791C166.808%2035.8228%20164.44%2034.0606%20160.691%2033.6693M169.768%2045.6166H174.175V18H169.768V45.6166ZM140.567%2027.7938H139.91V25.4437H135.504V45.6166H139.911V35.1028C139.911%2031.512%20141.555%2029.4222%20144.91%2029.4222H147.738V24.9831H146.093C144.997%2024.8728%20143.893%2025.0791%20142.913%2025.5771C141.933%2026.0751%20141.118%2026.8436%20140.568%2027.7902'%20fill='%23006D5C'/%3e%3c/svg%3e"
          className={`max-h-12 sm:max-h-16 ${logoAnimations[1]}`}
        />
        <img
          alt='شعار شريك'
          src='/images/Group 2307-nyjIzQtj.svg'
          className={`max-h-12 sm:max-h-16 ${logoAnimations[2]}`}
        />
        <img
          alt='شعار شريك'
          src='/images/Group%202306-DCwOO3nP.svg'
          className={`max-h-12 sm:max-h-16 ${logoAnimations[3]}`}
        />
        <img
          alt='مايكروسوفت'
          src='/images/microsoft-GkOjRO04.svg'
          className={`max-h-12 sm:max-h-16 ${logoAnimations[4]}`}
        />
      </motion.div>
    </div>
  );
};

export default ImageSection;
