import React, { useState } from 'react'
import Modal from '../components/core/Modal'
import { useTranslations } from '../hooks/useTranslation'

const SupportModal = ({ isOpen, onClose }) => {
  const { t } = useTranslations()
  const [mailTo] = useState('support@wppool.dev')
  const [copyEmailSuccess, setCopyEmailSuccess] = useState(false)

  // Generate links for mailing
  const supportLink = {
    Gmail: `https://mail.google.com/mail/?view=cm&fs=1&to=${mailTo}&su=${t(
      'support_email_subject'
    )}&body=${t('support_email_body')}`,
    Outlook: `https://outlook.office.com/owa/?path=/mail/action/compose&to=${mailTo}&subject=${t(
      'support_email_subject'
    )}&body=${t('support_email_body')}`,
    Yahoo: `https://compose.mail.yahoo.com/?to=${mailTo}&subject=${t(
      'support_email_subject'
    )}&body=${t('support_email_body')}`,
    Mailto: `mailto:${mailTo}?subject=${t('support_email_subject')}&body=${t(
      'support_email_body'
    )}`
  }

  // Copy Email
  const copyEmail = async () => {
    try {
      await navigator.clipboard.writeText('support@wppool.dev')
      setCopyEmailSuccess(true)
      setTimeout(() => {
        setCopyEmailSuccess(false)
      }, 1000)
    } catch (err) {
      console.error('Failed to copy email:', err)
    }
  }

  return (
    <Modal openModal={isOpen} toggleModal={onClose} outerClick={false}>
      {{
        header: (
          <div className='logo arcm-mt-2 arcm-mb-2'>
            <svg
              xmlns='http://www.w3.org/2000/svg'
              width='144'
              height='25'
              viewBox='0 0 144 25'
              fill='none'
            >
              <g clip-path='url(#clip0_1765_7623)'>
                <path
                  d='M47.1367 5.46123H49.3466C49.5974 5.46053 49.847 5.49576 50.088 5.5659C50.3216 5.63376 50.5438 5.73719 50.7468 5.87269C50.948 6.00719 51.1304 6.16868 51.289 6.35274C51.4469 6.53485 51.5745 6.74185 51.6668 6.96561C52.1976 8.27461 52.7329 9.57206 53.2726 10.858C53.8124 12.1439 54.3522 13.4413 54.892 14.7503C54.9846 14.9637 55.0491 15.1884 55.0841 15.4188C55.1116 15.6233 55.1299 15.8043 55.1389 15.9616C55.1628 15.6538 55.2227 15.3499 55.3174 15.0564C55.4311 14.6966 55.5639 14.3433 55.7152 13.9981L58.6387 6.95118C58.7207 6.74193 58.8415 6.55055 58.9944 6.38739C59.1617 6.20433 59.3507 6.04307 59.5572 5.90734C59.7689 5.76738 59.9972 5.6551 60.2367 5.57312C60.4685 5.49127 60.712 5.44882 60.9574 5.44751H63.1673L61.602 9.22147L63.3452 13.4271C63.5283 13.8636 63.7067 14.2931 63.8803 14.7157C64.0432 15.0929 64.1407 15.4959 64.1684 15.9068C64.1774 15.8327 64.1888 15.7467 64.2026 15.649C64.2163 15.5514 64.2414 15.4284 64.278 15.2802C64.324 15.1011 64.3791 14.9244 64.443 14.751C64.5161 14.547 64.6166 14.2963 64.7447 13.9989L67.6718 6.95189C67.7532 6.74365 67.8719 6.55252 68.0218 6.38812C68.1855 6.20402 68.3723 6.04261 68.5775 5.90807C68.7893 5.76813 69.0176 5.65583 69.257 5.57383C69.4888 5.49198 69.7323 5.44955 69.9777 5.44824H72.1876L66.1207 20.085H62.2225L60.1221 14.6817C60.0491 14.4868 59.9851 14.2874 59.9301 14.0833C59.8751 13.8791 59.8473 13.6684 59.8475 13.4567C59.8459 13.2532 59.8784 13.0508 59.9436 12.8583C59.7695 13.3597 59.447 14.2091 58.9759 15.4065C58.5049 16.6039 57.8757 18.1636 57.0883 20.0857H53.1901L47.1367 5.46123Z'
                  fill='#1F2937'
                />
                <path
                  d='M73.1467 5.45885H76.0823C76.1297 5.45885 76.1985 5.58638 76.2886 5.84144C76.4033 6.19768 76.4859 6.56374 76.5355 6.9351C76.6293 6.64924 76.8065 6.39901 77.0435 6.21754C77.315 5.99962 77.6154 5.8215 77.9357 5.6884C78.2743 5.54459 78.6261 5.43506 78.9859 5.36139C79.304 5.29205 79.6281 5.25482 79.9535 5.25023H80.0083C80.9867 5.24223 81.9555 5.44626 82.85 5.84867C83.7099 6.23488 84.4883 6.78588 85.1424 7.47144C86.4915 8.89861 87.2431 10.8007 87.2393 12.7782C87.2354 14.7557 86.4765 16.6548 85.1218 18.0765C84.4604 18.7592 83.6749 19.3053 82.8087 19.6849C81.9082 20.0823 80.9355 20.2839 79.9535 20.2768C79.3842 20.275 78.8188 20.1809 78.2787 19.9981C77.7135 19.8086 77.1942 19.5001 76.7546 19.0929V24.803H73.1445L73.1467 5.45885ZM79.9414 8.88487C79.3137 8.88178 78.6945 9.03234 78.1363 9.32378C77.5892 9.60273 77.116 10.011 76.7567 10.5141V14.9984C77.123 15.507 77.6023 15.9208 78.1555 16.2063C78.7088 16.4919 79.3206 16.6412 79.9414 16.6422C80.4469 16.6473 80.9476 16.5427 81.4099 16.3353C81.8494 16.1378 82.246 15.854 82.5768 15.5001C82.9093 15.1425 83.1724 14.7245 83.3523 14.2679C83.7275 13.2989 83.7275 12.2217 83.3523 11.2526C83.1746 10.795 82.9112 10.3765 82.5768 10.0204C82.2444 9.67015 81.8481 9.3887 81.4099 9.19166C80.9474 8.98514 80.4467 8.88128 79.9414 8.88703V8.88487Z'
                  fill='#1F2937'
                />
                <path
                  d='M92.3109 5.45891C92.3603 5.56619 92.4151 5.67076 92.4753 5.7722C92.5724 5.95845 92.6197 6.16728 92.6126 6.37787V7.21307C92.6987 6.96572 92.8397 6.74173 93.0246 6.55834C93.2228 6.35984 93.4468 6.18982 93.6905 6.05301C93.9512 5.90521 94.2246 5.78176 94.5073 5.68415C94.7888 5.58542 95.0752 5.50179 95.3653 5.43364C95.6255 5.37198 95.889 5.32547 96.1544 5.29433C96.3639 5.2688 96.5745 5.25482 96.7855 5.25245C97.761 5.24407 98.7271 5.44583 99.62 5.84439C100.473 6.22457 101.243 6.77383 101.885 7.45995C102.528 8.15527 103.035 8.96803 103.379 9.85513C104.102 11.7335 104.102 13.819 103.379 15.6973C103.034 16.5819 102.527 17.3924 101.885 18.086C101.243 18.7722 100.473 19.3214 99.62 19.7015C98.4185 20.2332 97.094 20.4118 95.7973 20.2169C95.4355 20.1611 95.0811 20.0642 94.7407 19.9282C94.3592 19.7757 93.9973 19.5769 93.6628 19.3363C93.271 19.0525 92.9179 18.7176 92.6126 18.3401V24.9972H90.375V5.45891H92.3109ZM96.7855 18.0629C97.4707 18.0711 98.1499 17.9311 98.7777 17.6521C99.3676 17.3884 99.8977 17.0043 100.335 16.5238C100.777 16.0335 101.122 15.4615 101.351 14.839C101.836 13.504 101.836 12.0375 101.351 10.7026C101.122 10.0801 100.777 9.50809 100.335 9.01776C99.8976 8.53739 99.3675 8.15337 98.7777 7.88947C98.1499 7.61055 97.4707 7.47053 96.7855 7.47872C96.0087 7.47859 95.2402 7.63975 94.5272 7.95228C93.8095 8.2614 93.1589 8.71102 92.6126 9.27546V15.9045C92.8582 16.2457 93.1451 16.5545 93.4664 16.8234C93.78 17.0882 94.1232 17.3148 94.4888 17.4984C94.8501 17.6795 95.2299 17.8196 95.6215 17.9163C96.0022 18.0129 96.393 18.0629 96.7855 18.065V18.0629Z'
                  fill='#1F2937'
                />
                <path
                  d='M105.828 12.772C105.823 11.7691 106.021 10.7757 106.412 9.85422C107.167 8.04806 108.585 6.61011 110.365 5.84348C111.277 5.45324 112.257 5.2522 113.246 5.2522C114.236 5.2522 115.216 5.45324 116.128 5.84348C117.908 6.60998 119.325 8.04797 120.081 9.85422C120.466 10.7795 120.664 11.7736 120.664 12.7778C120.664 13.7821 120.466 14.7762 120.081 15.7014C119.326 17.5078 117.908 18.9458 116.128 19.7122C115.216 20.1025 114.236 20.3036 113.246 20.3036C112.256 20.3036 111.277 20.1025 110.365 19.7122C108.585 18.9457 107.167 17.5077 106.412 15.7014C106.021 14.7761 105.822 13.7788 105.828 12.772ZM108.025 12.772C108.02 13.4829 108.16 14.187 108.437 14.8402C108.7 15.4691 109.08 16.041 109.556 16.5251C110.03 17.0059 110.592 17.389 111.21 17.6534C111.855 17.9246 112.547 18.0642 113.245 18.0642C113.943 18.0642 114.635 17.9246 115.28 17.6534C116.393 17.1804 117.31 16.3302 117.875 15.2478C118.44 14.1654 118.617 12.9178 118.376 11.7177C118.136 10.5176 117.493 9.43924 116.556 8.66648C115.62 7.89372 114.448 7.47439 113.241 7.47997C112.544 7.47484 111.852 7.61463 111.21 7.89072C110.592 8.15522 110.03 8.53835 109.556 9.01902C109.08 9.50312 108.7 10.075 108.437 10.7039C108.16 11.3571 108.02 12.0612 108.025 12.772Z'
                  fill='#1F2937'
                />
                <path
                  d='M122.656 12.772C122.651 11.7691 122.85 10.7757 123.24 9.85422C123.995 8.04806 125.413 6.61011 127.193 5.84348C128.105 5.45324 129.085 5.2522 130.074 5.2522C131.064 5.2522 132.044 5.45324 132.956 5.84348C134.736 6.60998 136.154 8.04797 136.909 9.85422C137.294 10.7795 137.492 11.7736 137.492 12.7778C137.492 13.7821 137.294 14.7761 136.909 15.7014C136.154 17.5078 134.736 18.9458 132.956 19.7122C132.044 20.1025 131.064 20.3036 130.074 20.3036C129.085 20.3036 128.105 20.1025 127.193 19.7122C125.413 18.9457 123.995 17.5077 123.24 15.7014C122.849 14.7761 122.65 13.7788 122.656 12.772ZM124.853 12.772C124.848 13.4829 124.988 14.187 125.265 14.8402C125.528 15.4691 125.908 16.0409 126.383 16.5251C126.858 17.0058 127.42 17.3889 128.037 17.6534C128.68 17.9296 129.371 18.0694 130.069 18.0641C130.927 18.0639 131.771 17.8492 132.528 17.4389C133.284 17.0286 133.929 16.4354 134.406 15.7119C134.883 14.9883 135.176 14.1567 135.261 13.2906C135.345 12.4244 135.218 11.5506 134.89 10.7462C134.563 9.94191 134.045 9.23195 133.382 8.67919C132.719 8.12643 131.933 7.74792 131.092 7.57714C130.25 7.40637 129.381 7.44858 128.559 7.70007C127.738 7.95157 126.991 8.40459 126.383 9.01902C125.908 9.50322 125.528 10.0751 125.265 10.7039C124.989 11.3571 124.848 12.0612 124.853 12.772Z'
                  fill='#1F2937'
                />
                <path
                  d='M143.015 0.127197V20.0842H140.777V0.127197H143.015Z'
                  fill='#1F2937'
                />
                <path
                  d='M19.2036 10.8362L11.6476 3.16986C10.368 1.87165 8.63255 1.14233 6.82298 1.14233C5.01341 1.14233 3.27795 1.87165 1.99836 3.16986C0.718829 4.46812 0 6.22892 0 8.0649C0 9.90088 0.718829 11.6617 1.99836 12.9599L9.5544 20.6263C10.834 21.9245 12.5694 22.6538 14.379 22.6538C16.1886 22.6538 17.924 21.9245 19.2036 20.6263C20.4832 19.328 21.202 17.5672 21.202 15.7312C21.202 13.8952 20.4832 12.1344 19.2036 10.8362Z'
                  fill='#5CC9F6'
                />
                <path
                  d='M41.2339 8.08809C39.9543 6.78988 38.2188 6.06055 36.4093 6.06055C34.5997 6.06055 32.8642 6.78988 31.5846 8.08809C30.951 8.73094 30.4483 9.49412 30.1054 10.3341C29.7624 11.174 29.5859 12.0743 29.5859 12.9835C29.5859 13.8927 29.7624 14.7929 30.1054 15.6329C30.4483 16.4728 30.951 17.236 31.5846 17.8789C32.8642 19.1771 34.5997 19.9064 36.4093 19.9064C38.2188 19.9064 39.9543 19.1771 41.2339 17.8789C41.8676 17.236 42.3702 16.4728 42.7131 15.6329C43.0561 14.7929 43.2326 13.8927 43.2326 12.9835C43.2326 12.0743 43.0561 11.174 42.7131 10.3341C42.3702 9.49412 41.8676 8.73094 41.2339 8.08809Z'
                  fill='#FA8807'
                />
                <path
                  d='M12.3435 8.0684L9.52247 10.9306L9.51037 10.9176C8.40772 12.0077 6.97417 12.6875 5.44263 12.8464C3.91109 13.0054 2.37157 12.6342 1.07422 11.7933C1.34016 12.2148 1.65028 12.606 1.99915 12.9598L5.04434 16.0495L5.07493 16.0379L9.59077 20.6197L21.9615 8.0684C21.33 7.42752 20.5803 6.91912 19.7552 6.57227C18.93 6.22541 18.0457 6.04688 17.1525 6.04688C16.2593 6.04688 15.3749 6.22541 14.5498 6.57227C13.7247 6.91912 12.975 7.42752 12.3435 8.0684Z'
                  fill='#00AEEB'
                />
                <path
                  d='M36.3757 3.23084L36.3693 3.22434C35.7459 2.57083 34.9998 2.05078 34.1749 1.69489C33.3501 1.33901 32.4632 1.15452 31.5669 1.15236C30.6706 1.15021 29.7829 1.33042 28.9564 1.68234C28.1299 2.03425 27.3813 2.55075 26.7549 3.20125L14.3906 15.746C13.1871 16.9662 11.5776 17.6862 9.87794 17.7648C8.17825 17.8433 6.51098 17.2747 5.20312 16.1705L9.58876 20.6201L9.59373 20.6158C10.8717 21.9124 12.605 22.6408 14.4123 22.6408C16.2196 22.6408 17.9529 21.9124 19.2309 20.6158L31.2729 8.39804L31.2928 8.40381C31.386 8.29698 31.4813 8.19158 31.5824 8.08907C32.4233 7.23487 33.47 6.61885 34.6183 6.30225C35.7667 5.98565 36.9767 5.97949 38.1281 6.28438C37.8156 5.12926 37.2116 4.07677 36.3757 3.23084Z'
                  fill='#0080CA'
                />
                <path
                  d='M38.1267 6.28476C36.9753 5.97987 35.7653 5.98603 34.617 6.30263C33.4686 6.61923 32.422 7.23525 31.581 8.08945C31.48 8.19196 31.3846 8.29735 31.2914 8.40419L31.2722 8.39842L19.2302 20.6162C19.2082 20.6385 19.1854 20.6587 19.1641 20.6804L19.1719 20.6891C20.4515 21.9873 22.187 22.7166 23.9965 22.7166C25.8061 22.7166 27.5416 21.9873 28.8212 20.6891L36.3772 13.0227C37.2306 12.1573 37.8423 11.0775 38.1497 9.8937C38.4571 8.70987 38.4492 7.46447 38.1267 6.28476Z'
                  fill='#EE5913'
                />
                <path
                  d='M17.8059 5.44238C18.4063 5.44238 18.8931 4.94854 18.8931 4.33935C18.8931 3.73017 18.4063 3.23633 17.8059 3.23633C17.2055 3.23633 16.7188 3.73017 16.7188 4.33935C16.7188 4.94854 17.2055 5.44238 17.8059 5.44238Z'
                  fill='#5CC9F6'
                />
                <path
                  d='M15.4043 3.29769C15.7894 3.29769 16.1016 2.98096 16.1016 2.59025C16.1016 2.19954 15.7894 1.88281 15.4043 1.88281C15.0192 1.88281 14.707 2.19954 14.707 2.59025C14.707 2.98096 15.0192 3.29769 15.4043 3.29769Z'
                  fill='#5CC9F6'
                />
                <path
                  d='M16.9434 1.41488C17.3284 1.41488 17.6406 1.09815 17.6406 0.707438C17.6406 0.316731 17.3284 0 16.9434 0C16.5583 0 16.2461 0.316731 16.2461 0.707438C16.2461 1.09815 16.5583 1.41488 16.9434 1.41488Z'
                  fill='#5CC9F6'
                />
              </g>
              <defs>
                <clipPath id='clip0_1765_7623'>
                  <rect width='143.015' height='25' fill='white' />
                </clipPath>
              </defs>
            </svg>
            <p className='text-gray-500 text-xs font-normalleading-normal'>
              {t('support_modal_subtitle')}
            </p>
          </div>
        ),
        body: (
          <>
            <div className='arcm-grid arcm-grid-cols-1 arcm-gap-y-3'>
              {/* Gmail Button */}
              <a
                href={supportLink.Gmail}
                target='_blank'
                rel='noopener noreferrer'
                className='arcm-w-full arcm-group arcm-cursor-pointer arcm-rounded-[10px] arcm-pl-4 sm:arcm-pl-5 arcm-py-3 arcm-pr-4 arcm-bg-[#F9FAFB] arcm-flex arcm-justify-between arcm-items-center'
              >
                <div className='arcm-gap-2.5 arcm-flex arcm-items-center'>
                  <div className='arcm-w-14 arcm-h-12 arcm-px-2.5 arcm-py-2.5 arcm-bg-white arcm-rounded-sm arcm-justify-center arcm-items-center arcm-inline-flex'>
                    <svg
                      class='h-8'
                      xmlns='http://www.w3.org/2000/svg'
                      width='37'
                      height='28'
                      viewBox='0 0 37 28'
                      fill='none'
                    >
                      <path
                        d='M8.25559 27.2516V13.217L3.90304 9.23508L0 7.02539V24.7749C0 26.1453 1.11031 27.2516 2.47673 27.2516H8.25559Z'
                        fill='#4285F4'
                      />
                      <path
                        d='M28.0693 27.2515H33.8482C35.2187 27.2515 36.3249 26.141 36.3249 24.7747V7.02539L31.9041 9.55633L28.0693 13.2169V27.2515Z'
                        fill='#34A853'
                      />
                      <path
                        d='M8.25535 13.2166L7.66309 7.73284L8.25535 2.48438L18.162 9.91444L28.0686 2.48438L28.7311 7.44948L28.0686 13.2166L18.162 20.6466L8.25535 13.2166Z'
                        fill='#EA4335'
                      />
                      <path
                        d='M28.0693 2.48364V13.2158L36.3249 7.0242V3.72194C36.3249 0.659189 32.8287 -1.0868 30.3811 0.75L28.0693 2.48364Z'
                        fill='#FBBC04'
                      />
                      <path
                        d='M0 7.02427L3.7969 9.87205L8.25559 13.2159V2.48371L5.94388 0.750065C3.49198 -1.08688 0 0.659254 0 3.72186V7.02427Z'
                        fill='#C5221F'
                      />
                    </svg>
                  </div>
                  <div className='text'>
                    <h6 className='arcm-text-[#1F2937] arcm-text-xs arcm-font-semibold arcm-leading-normal arcm-mb-1'>
                      {t('gmail')}
                    </h6>
                    <p className='arcm-text-[#6B7280] arcm-text-xs arcm-font-normal arcm-leading-normal'>
                      {t('open_gmail_browser')}
                    </p>
                  </div>
                </div>
                <div className='arcm-icon arcm-opacity-0 arcm-transition-all group-hover:arcm-opacity-100 arcm-group-hover:arcm-translate-x-1'>
                  <svg
                    xmlns='http://www.w3.org/2000/svg'
                    width='16'
                    height='8'
                    viewBox='0 0 16 8'
                    fill='none'
                  >
                    <path
                      fill-rule='evenodd'
                      clip-rule='evenodd'
                      d='M0 4C-1.81059e-08 3.58579 0.335786 3.25 0.75 3.25L13.3401 3.25L11.2397 1.2996C10.9361 1.01775 10.9186 0.543198 11.2004 0.239665C11.4823 -0.0638681 11.9568 -0.0814439 12.2603 0.200408L15.7603 3.45041C15.9132 3.59232 16 3.79145 16 4C16 4.20855 15.9132 4.40769 15.7603 4.5496L12.2603 7.7996C11.9568 8.08145 11.4823 8.06387 11.2004 7.76034C10.9186 7.45681 10.9361 6.98226 11.2397 6.70041L13.3401 4.75L0.75 4.75C0.335786 4.75 1.81059e-08 4.41422 0 4Z'
                      fill='#2563EB'
                    />
                  </svg>
                </div>
              </a>

              {/* Outlook Button */}
              <a
                href={supportLink.Outlook}
                target='_blank'
                rel='noopener noreferrer'
                className='arcm-w-full arcm-group arcm-cursor-pointer arcm-rounded-[10px] arcm-pl-4 sm:arcm-pl-5 arcm-py-3 arcm-pr-4 arcm-bg-[#F9FAFB] arcm-flex arcm-justify-between arcm-items-center'
              >
                <div className='arcm-gap-2.5 arcm-flex arcm-items-center'>
                  <div className='arcm-w-14 arcm-h-12 arcm-px-2.5 arcm-py-2.5 arcm-bg-white arcm-rounded-sm arcm-justify-center arcm-items-center arcm-inline-flex'>
                    <svg
                      class='h-8'
                      xmlns='http://www.w3.org/2000/svg'
                      width='30'
                      height='31'
                      viewBox='0 0 30 31'
                      fill='none'
                    >
                      <path
                        d='M18.582 6.36523V12.2377L20.6364 13.5297C20.7105 13.546 20.7874 13.546 20.8615 13.5297L29.6943 7.57467C29.6879 7.28566 29.5821 7.00768 29.3949 6.78743C29.2076 6.56719 28.9503 6.4181 28.6661 6.36523H18.582Z'
                        fill='#0072C6'
                      />
                      <path
                        d='M18.5811 14.4289L20.4543 15.7155C20.542 15.7689 20.6427 15.7972 20.7454 15.7972C20.848 15.7972 20.9488 15.7689 21.0365 15.7155C20.7148 15.9096 29.6923 9.94922 29.6923 9.94922V20.742C29.7157 20.9607 29.6911 21.1818 29.6201 21.39C29.5491 21.5982 29.4334 21.7883 29.2813 21.9471C29.1291 22.1059 28.9441 22.2296 28.7391 22.3094C28.5342 22.3892 28.3142 22.4233 28.0947 22.4092H18.58L18.5811 14.4289ZM8.88415 11.7216C8.57293 11.7201 8.26709 11.8028 7.99905 11.961C7.73102 12.1191 7.51076 12.3469 7.36163 12.6201C6.95432 13.3442 6.75888 14.1683 6.79765 14.9982C6.75532 15.8264 6.95103 16.6494 7.36163 17.3699C7.51014 17.6318 7.72497 17.8501 7.98454 18.0027C8.2441 18.1553 8.53926 18.2369 8.84035 18.2393C9.14145 18.2416 9.43786 18.1647 9.69982 18.0163C9.96178 17.8678 10.18 17.653 10.3327 17.3935C10.7388 16.6763 10.9305 15.8576 10.8849 15.0347C10.9314 14.1859 10.7461 13.3405 10.3488 12.589C10.2068 12.3247 9.99534 12.1042 9.73722 11.9514C9.4791 11.7985 9.18413 11.719 8.88415 11.7216Z'
                        fill='#0072C6'
                      />
                      <path
                        d='M0 3.38279V26.3568L17.4768 30.0216V0L0 3.38279ZM11.6955 18.7538C11.3686 19.2147 10.9339 19.5886 10.4293 19.843C9.92472 20.0973 9.36557 20.2244 8.80061 20.2131C8.24987 20.2229 7.70491 20.0995 7.21209 19.8535C6.71927 19.6074 6.29316 19.246 5.97 18.7999C5.20358 17.7299 4.82018 16.4328 4.88172 15.118C4.81652 13.7388 5.20685 12.3764 5.99252 11.2409C6.32358 10.7712 6.76511 10.3902 7.27819 10.1314C7.79127 9.87264 8.36013 9.74405 8.93463 9.75701C9.48138 9.74604 10.0225 9.86945 10.5104 10.1164C10.9983 10.3634 11.4182 10.7263 11.7331 11.1734C12.4918 12.2666 12.8687 13.5797 12.8053 14.9089C12.8721 16.2782 12.4817 17.6308 11.6955 18.7538Z'
                        fill='#0072C6'
                      />
                    </svg>
                  </div>
                  <div className='text'>
                    <h6 className='arcm-text-[#1F2937] arcm-text-xs arcm-font-semibold arcm-leading-normal arcm-mb-1'>
                      {t('outlook')}
                    </h6>
                    <p className='arcm-text-[#6B7280] arcm-text-xs arcm-font-normal arcm-leading-normal'>
                      {t('open_outlook_browser')}
                    </p>
                  </div>
                </div>
                <div className='arcm-icon arcm-opacity-0 arcm-transition-all group-hover:arcm-opacity-100 arcm-group-hover:arcm-translate-x-1'>
                  <svg
                    xmlns='http://www.w3.org/2000/svg'
                    width='16'
                    height='8'
                    viewBox='0 0 16 8'
                    fill='none'
                  >
                    <path
                      fill-rule='evenodd'
                      clip-rule='evenodd'
                      d='M0 4C-1.81059e-08 3.58579 0.335786 3.25 0.75 3.25L13.3401 3.25L11.2397 1.2996C10.9361 1.01775 10.9186 0.543198 11.2004 0.239665C11.4823 -0.0638681 11.9568 -0.0814439 12.2603 0.200408L15.7603 3.45041C15.9132 3.59232 16 3.79145 16 4C16 4.20855 15.9132 4.40769 15.7603 4.5496L12.2603 7.7996C11.9568 8.08145 11.4823 8.06387 11.2004 7.76034C10.9186 7.45681 10.9361 6.98226 11.2397 6.70041L13.3401 4.75L0.75 4.75C0.335786 4.75 1.81059e-08 4.41422 0 4Z'
                      fill='#2563EB'
                    />
                  </svg>
                </div>
              </a>

              {/* Yahoo Button */}
              <a
                href={supportLink.Yahoo}
                target='_blank'
                rel='noopener noreferrer'
                className='arcm-w-full arcm-group arcm-cursor-pointer arcm-rounded-[10px] arcm-pl-4 sm:arcm-pl-5 arcm-py-3 arcm-pr-4 arcm-bg-[#F9FAFB] arcm-flex arcm-justify-between arcm-items-center'
              >
                <div className='arcm-gap-2.5 arcm-flex arcm-items-center'>
                  <div className='arcm-w-14 arcm-h-12 arcm-px-2.5 arcm-py-2.5 arcm-bg-white arcm-rounded-sm arcm-justify-center arcm-items-center arcm-inline-flex'>
                    <svg
                      xmlns='http://www.w3.org/2000/svg'
                      width='42'
                      height='24'
                      viewBox='0 0 42 24'
                      fill='none'
                    >
                      <path
                        fill-rule='evenodd'
                        clip-rule='evenodd'
                        d='M37.7084 23.6197L33.4181 23.0982L33.8953 19.3529L38.1856 19.8735L37.7084 23.6197ZM42 0.900511L34.658 0L34.705 16.933L37.9 17.3588L42 0.900511ZM27.2215 3.8419C24.2655 1.61215 20.4519 0.523592 15.8269 0.523592C11.1552 0.523592 7.3416 1.61215 4.43394 3.8419C1.47798 6.02236 0 8.82251 0 12.2842C0 15.7943 1.47798 18.6412 4.43394 20.8233C6.84558 22.6327 9.88134 23.692 13.5122 24H18.1243C21.7287 23.6924 24.7695 22.6331 27.2219 20.8233C30.1295 18.6408 31.6071 15.7943 31.6071 12.2842C31.6067 8.82251 30.1291 6.02236 27.2215 3.8419ZM25.0282 9.39081L22.7875 9.86593C22.4545 9.95995 21.5481 10.6248 19.9752 11.9056C18.3061 13.2336 17.4481 14.0873 17.3057 14.5139L17.2103 15.7007L17.1625 16.4123L17.3536 18.2142L20.3095 18.2597L20.2612 19.1615H15.4459L11.1552 19.2091L11.2984 18.3554L12.6811 18.3099C13.3963 18.2601 13.826 18.1661 13.9679 18.0232C14.0637 17.9283 14.1112 17.3588 14.1112 16.363V15.7466L14.0637 14.5135C13.9679 14.2302 13.2052 13.1855 11.7277 11.3828C10.2022 9.53331 9.20136 8.44225 8.72424 8.06198L5.95938 7.68423V6.8769C6.1026 6.78288 7.62804 6.78288 10.4404 6.82968C12.395 6.7833 14.0158 6.7833 15.3035 6.8769L15.2078 7.54215L12.2993 7.82547C13.2052 9.1543 14.5883 11.0034 16.4472 13.3288C18.8786 11.4777 20.1659 10.2917 20.2129 9.7694L17.7345 9.39081L17.5442 8.53794H21.6913L25.6007 8.58516L25.0282 9.39081Z'
                        fill='#8921B4'
                      />
                    </svg>
                  </div>
                  <div className='text'>
                    <h6 className='arcm-text-[#1F2937] arcm-text-xs arcm-font-semibold arcm-leading-normal arcm-mb-1'>
                      {t('yahoo')}
                    </h6>
                    <p className='arcm-text-[#6B7280] arcm-text-xs arcm-font-normal arcm-leading-normal'>
                      {t('open_yahoo_browser')}
                    </p>
                  </div>
                </div>
                <div className='arcm-icon arcm-opacity-0 arcm-transition-all group-hover:arcm-opacity-100 arcm-group-hover:arcm-translate-x-1'>
                  <svg
                    xmlns='http://www.w3.org/2000/svg'
                    width='16'
                    height='8'
                    viewBox='0 0 16 8'
                    fill='none'
                  >
                    <path
                      fill-rule='evenodd'
                      clip-rule='evenodd'
                      d='M0 4C-1.81059e-08 3.58579 0.335786 3.25 0.75 3.25L13.3401 3.25L11.2397 1.2996C10.9361 1.01775 10.9186 0.543198 11.2004 0.239665C11.4823 -0.0638681 11.9568 -0.0814439 12.2603 0.200408L15.7603 3.45041C15.9132 3.59232 16 3.79145 16 4C16 4.20855 15.9132 4.40769 15.7603 4.5496L12.2603 7.7996C11.9568 8.08145 11.4823 8.06387 11.2004 7.76034C10.9186 7.45681 10.9361 6.98226 11.2397 6.70041L13.3401 4.75L0.75 4.75C0.335786 4.75 1.81059e-08 4.41422 0 4Z'
                      fill='#2563EB'
                    />
                  </svg>
                </div>
              </a>

              {/* Default Email App Button */}
              <a
                href={supportLink.Mailto}
                className='arcm-w-full arcm-group arcm-cursor-pointer arcm-rounded-[10px] arcm-pl-4 sm:arcm-pl-5 arcm-py-3 arcm-pr-4 arcm-bg-[#F9FAFB] arcm-flex arcm-justify-between arcm-items-center'
              >
                <div className='arcm-gap-2.5 arcm-flex arcm-items-center'>
                  <div className='arcm-w-14 arcm-h-12 arcm-px-2.5 arcm-py-2.5 arcm-bg-white arcm-rounded-sm arcm-justify-center arcm-items-center arcm-inline-flex'>
                    <svg
                      class='h-8'
                      xmlns='http://www.w3.org/2000/svg'
                      width='35'
                      height='35'
                      viewBox='0 0 35 35'
                      fill='none'
                    >
                      <path
                        d='M0 13.1245L16.8525 23.8498C17.045 23.992 17.2725 24.062 17.5 24.062C17.7275 24.062 17.955 23.992 18.1475 23.8498L35 13.1245L18.1562 0.218203C17.7669 -0.0727344 17.2331 -0.0727344 16.8438 0.218203L0 13.1245Z'
                        fill='#64B5F6'
                      />
                      <path
                        d='M28.4375 0H6.5625C5.35719 0 4.375 0.982188 4.375 2.1875V26.25C4.375 26.8538 4.865 27.3438 5.46875 27.3438H29.5312C30.135 27.3438 30.625 26.8538 30.625 26.25V2.1875C30.625 0.982188 29.645 0 28.4375 0Z'
                        fill='#ECEFF1'
                      />
                      <path
                        d='M9.84375 6.5625H25.1562C25.76 6.5625 26.25 6.0725 26.25 5.46875C26.25 4.865 25.76 4.375 25.1562 4.375H9.84375C9.24 4.375 8.75 4.865 8.75 5.46875C8.75 6.0725 9.24 6.5625 9.84375 6.5625Z'
                        fill='#90A4AE'
                      />
                      <path
                        d='M25.1562 8.75H9.84375C9.24 8.75 8.75 9.24 8.75 9.84375C8.75 10.4475 9.24 10.9375 9.84375 10.9375H25.1562C25.76 10.9375 26.25 10.4475 26.25 9.84375C26.25 9.24 25.76 8.75 25.1562 8.75Z'
                        fill='#90A4AE'
                      />
                      <path
                        d='M18.5938 13.125H9.84375C9.24 13.125 8.75 13.615 8.75 14.2188C8.75 14.8225 9.24 15.3125 9.84375 15.3125H18.5938C19.1975 15.3125 19.6875 14.8225 19.6875 14.2188C19.6875 13.615 19.1975 13.125 18.5938 13.125Z'
                        fill='#90A4AE'
                      />
                      <path
                        d='M18.1475 23.8503C17.955 23.9925 17.7275 24.0625 17.5 24.0625C17.2725 24.0625 17.045 23.9925 16.8525 23.8503L0 13.125V32.8125C0 34.02 0.98 35 2.1875 35H32.8125C34.02 35 35 34.02 35 32.8125V13.125L18.1475 23.8503Z'
                        fill='#1E88E5'
                      />
                      <path
                        d='M32.8125 35H2.1875C0.960313 35 0 34.0397 0 32.8125C0 32.4647 0.16625 32.1366 0.44625 31.9309L16.8525 20.9934C17.045 20.8513 17.2725 20.7812 17.5 20.7812C17.7275 20.7812 17.955 20.8513 18.1475 20.9934L34.5537 31.9309C34.8337 32.1366 35 32.4647 35 32.8125C35 34.0397 34.0397 35 32.8125 35Z'
                        fill='#2196F3'
                      />
                    </svg>
                  </div>
                  <div className='text'>
                    <h6 className='arcm-text-[#1F2937] arcm-text-xs arcm-font-semibold arcm-leading-normal arcm-mb-1'>
                      {t('default_email_app')}
                    </h6>
                    <p className='arcm-text-[#6B7280] arcm-text-xs arcm-font-normal arcm-leading-normal'>
                      {t('open_default_email_app')}
                    </p>
                  </div>
                </div>
                <div className='arcm-icon arcm-opacity-0 arcm-transition-all group-hover:arcm-opacity-100 arcm-group-hover:arcm-translate-x-1'>
                  <svg
                    xmlns='http://www.w3.org/2000/svg'
                    width='16'
                    height='8'
                    viewBox='0 0 16 8'
                    fill='none'
                  >
                    <path
                      fill-rule='evenodd'
                      clip-rule='evenodd'
                      d='M0 4C-1.81059e-08 3.58579 0.335786 3.25 0.75 3.25L13.3401 3.25L11.2397 1.2996C10.9361 1.01775 10.9186 0.543198 11.2004 0.239665C11.4823 -0.0638681 11.9568 -0.0814439 12.2603 0.200408L15.7603 3.45041C15.9132 3.59232 16 3.79145 16 4C16 4.20855 15.9132 4.40769 15.7603 4.5496L12.2603 7.7996C11.9568 8.08145 11.4823 8.06387 11.2004 7.76034C10.9186 7.45681 10.9361 6.98226 11.2397 6.70041L13.3401 4.75L0.75 4.75C0.335786 4.75 1.81059e-08 4.41422 0 4Z'
                      fill='#2563EB'
                    />
                  </svg>
                </div>
              </a>

              {/* Copy Email Button */}
              <div className='arcm-w-full arcm-group arcm-rounded-[10px] arcm-pl-4 sm:arcm-pl-5 arcm-py-3 arcm-pr-4 arcm-bg-[#F9FAFB] arcm-flex arcm-justify-between arcm-items-center'>
                <div className='arcm-gap-2.5 arcm-flex arcm-items-center'>
                  <div className='arcm-w-14 arcm-h-12 arcm-px-2.5 arcm-py-2.5 arcm-bg-white arcm-rounded-sm arcm-justify-center arcm-items-center arcm-inline-flex'>
                    <svg
                      class='h-8'
                      xmlns='http://www.w3.org/2000/svg'
                      width='29'
                      height='29'
                      viewBox='0 0 29 29'
                      fill='none'
                    >
                      <path
                        d='M14.5 29C22.5081 29 29 22.5081 29 14.5C29 6.49187 22.5081 0 14.5 0C6.49187 0 0 6.49187 0 14.5C0 22.5081 6.49187 29 14.5 29Z'
                        fill='#47C8FF'
                      />
                      <path
                        d='M24.5612 11.7801C23.9612 9.87969 22.7747 8.19956 21.1591 6.96245C19.5434 5.72533 17.5749 4.98966 15.5145 4.85298C12.9032 4.69537 10.3308 5.52314 8.34402 7.16039C6.35724 8.79764 5.11265 11.1153 4.87469 13.621C4.63673 16.1267 5.42416 18.6228 7.06967 20.5791C8.71517 22.5353 11.0891 23.7974 13.6869 24.0973C15.1186 24.2631 16.5705 24.1337 17.9461 23.7177C18.0652 23.6869 18.1765 23.6333 18.2734 23.5601C18.3703 23.4869 18.4509 23.3955 18.5101 23.2916C18.5694 23.1877 18.6062 23.0733 18.6183 22.9553C18.6304 22.8374 18.6175 22.7183 18.5805 22.6052C18.5435 22.4922 18.4831 22.3875 18.4029 22.2975C18.3227 22.2074 18.2244 22.1339 18.114 22.0814C18.0035 22.0289 17.8831 21.9984 17.76 21.9917C17.6369 21.9851 17.5138 22.0025 17.3979 22.0428C16.247 22.3936 15.03 22.4964 13.8332 22.3439C12.6364 22.1915 11.4891 21.7875 10.4729 21.1608C9.45675 20.534 8.59651 19.6998 7.95331 18.7173C7.3101 17.7349 6.89971 16.6283 6.75127 15.4762C6.60283 14.3241 6.71998 13.1547 7.0944 12.051C7.46883 10.9473 8.09134 9.9364 8.91775 9.0901C9.74415 8.2438 10.7542 7.58283 11.8761 7.15413C12.998 6.72543 14.2044 6.53951 15.4094 6.60958C17.0976 6.7254 18.7093 7.33167 20.0311 8.34806C21.3529 9.36446 22.3224 10.743 22.8112 12.3011C23.1496 13.4837 23.2298 14.7209 23.047 15.9347C22.9556 16.6816 22.8697 17.9259 22.2821 18.5059C22.0767 18.7488 21.8197 18.9466 21.5283 19.0862C21.2369 19.2258 20.9179 19.3039 20.5925 19.3152C20.4459 19.3085 20.3025 19.2709 20.1726 19.2052C20.0427 19.1394 19.9293 19.0471 19.8405 18.9347C19.6556 18.7276 19.5324 18.4761 19.4841 18.2071V10.1105C19.4841 9.87741 19.3878 9.6539 19.2164 9.4891C19.0451 9.32431 18.8126 9.23172 18.5703 9.23172C18.3279 9.23172 18.0955 9.32431 17.9241 9.4891C17.7527 9.6539 17.6565 9.87741 17.6565 10.1105V10.2959C16.9132 9.62394 15.9351 9.24425 14.9151 9.23172C12.3957 9.23172 10.346 11.5964 10.346 14.5041C10.346 17.4119 12.3957 19.7766 14.9151 19.7766C15.9607 19.7635 16.9613 19.3657 17.7113 18.665C17.8309 19.1349 18.0517 19.5755 18.3592 19.9585C18.6035 20.2802 18.9185 20.5463 19.2817 20.7379C19.6449 20.9296 20.0475 21.0421 20.4609 21.0674C21.0546 21.0887 21.6456 20.9795 22.1889 20.7482C22.7321 20.5169 23.2134 20.1696 23.5962 19.7326C24.5685 18.7722 24.7722 17.1078 24.8974 15.8398C25.0643 14.4785 24.95 13.0988 24.5612 11.7801ZM14.9151 18.0191C13.4036 18.0191 12.1737 16.4426 12.1737 14.5041C12.1737 12.5656 13.4036 10.9892 14.9151 10.9892C16.4265 10.9892 17.6565 12.5656 17.6565 14.5041C17.6565 16.4426 16.4265 18.0191 14.9151 18.0191Z'
                        fill='white'
                      />
                    </svg>
                  </div>
                  <div className='text'>
                    <h6 className='arcm-text-[#1F2937] arcm-text-xs arcm-font-semibold arcm-leading-normal arcm-mb-1'>
                      {mailTo}
                    </h6>
                    <p className='arcm-text-[#6B7280] arcm-text-xs arcm-font-normal arcm-leading-normal'>
                      {t('copy_email_desc')}
                    </p>
                  </div>
                </div>
                <button
                  onClick={copyEmail}
                  className={`arcm-flex arcm-opacity-[0] arcm-pointer-events-none group-hover:arcm-opacity-[1] group-hover:arcm-pointer-events-auto arcm-min-w-[88px] arcm-text-xs arcm-border arcm-border-[#2563EB] arcm-rounded-[8px] arcm-px-[12px] arcm-py-[10px] arcm-items-center arcm-justify-center arcm-transition-all ${
                    copyEmailSuccess
                      ? 'arcm-bg-[#3858E9] arcm-text-white'
                      : 'arcm-text-[#3858E9]'
                  }`}
                >
                  {copyEmailSuccess ? t('copied') : t('copy_email')}
                </button>
              </div>
            </div>

            <div className='arcm-text-center arcm-flex arcm-justify-center arcm-items-center arcm-gap-1 arcm-mt-5 arcm-mb-2'>
              <span className='arcm-text-gray-500 arcm-text-xs arcm-font-normal arcm-leading-none'>
                {t('powered_by')}
              </span>
              <a
                href='https://wppool.dev'
                target='_blank'
                className='arcm-cursor-pointer arcm-text-blue-600 arcm-text-xs arcm-font-medium arcm-leading-none'
              >
                WPPOOL
              </a>
            </div>
          </>
        )
      }}
    </Modal>
  )
}

export default SupportModal
