"use client";

import Link from "next/link";
import { useLang } from "@/context/LanguageContext";
import { t } from "@/lib/translations";

export default function Footer() {
  const { lang } = useLang();
  const tr = t[lang].footer;

  const footerLinks = [
    { href: "/privacy", label: tr.privacy },
    { href: "/terms", label: tr.terms },
    { href: "/faq", label: tr.faq },
    { href: "/contact", label: tr.support },
  ];

  return (
    <footer className="bg-slate-50 w-full py-12">
      <div className="max-w-7xl mx-auto px-8 flex flex-col md:flex-row justify-between items-center gap-6">
        <div className="flex flex-col items-center md:items-start">
          <span className="text-xl font-bold text-slate-900 mb-2 font-headline">
            Integrasi Persada Teknologi
          </span>
          <p className="text-sm text-slate-500">
            © {new Date().getFullYear()} Integrasi Persada Teknologi. {tr.rights}
          </p>
        </div>
        <div className="flex gap-8 text-sm text-slate-500">
          {footerLinks.map((link) => (
            <Link
              key={link.href}
              href={link.href}
              className="hover:text-blue-500 transition-all cursor-pointer"
            >
              {link.label}
            </Link>
          ))}
        </div>
      </div>
    </footer>
  );
}
