import { getTranslations } from 'next-intl/server'
import { getRealmName } from '@/lib/realm'

/**
 * Pie de página — réplica del partial Django `partials/footer.html`
 * (enlaces legales + copyright + crédito de diseño) con las clases del tema real.
 */
export async function Footer() {
  const t = await getTranslations('UI')
  const year = new Date().getFullYear()
  const realmName = await getRealmName()

  return (
    <footer>
      <p>
        <a href="/terms-and-conditions">{t('footer.terms')}</a>
        <span className="third-brown">
          &nbsp;&nbsp; <i className="fas fa-grip-lines-vertical"></i>&nbsp;&nbsp;{' '}
        </span>
        <a href="/privacy-policy">{t('footer.privacy')}</a>
        <span className="third-brown">
          &nbsp;&nbsp; <i className="fas fa-grip-lines-vertical"></i>&nbsp;&nbsp;{' '}
        </span>
        <a href="/refund-policy">{t('footer.refund')}</a>
        <span className="third-brown">
          &nbsp;&nbsp; <i className="fas fa-grip-lines-vertical"></i>&nbsp;&nbsp;{' '}
        </span>
        <a href="/cookies">{t('footer.cookies')}</a>
        <span className="third-brown">
          &nbsp;&nbsp; <i className="fas fa-grip-lines-vertical"></i>&nbsp;&nbsp;{' '}
        </span>
        <a href="/legal-notice">{t('footer.legal')}</a>
        <span className="third-brown">
          &nbsp;&nbsp; <i className="fas fa-grip-lines-vertical"></i>&nbsp;&nbsp;{' '}
        </span>
        <a href="/contact-us">{t('footer.contact')}</a>
      </p>
      <br />
      <p className="third-brown">
        {t('footer.copyright', { realmName, year: String(year) })}
      </p>
      <p className="third-brown">
        {t('footer.design', { realmName })} <i className="fas fa-cat"></i>
      </p>
    </footer>
  )
}
