import Link from "next/link";
import { getMessages, formatMessage } from "@/lib/i18n/server";

const LINKS = [
  { href: "/about", key: "about" },
  { href: "/privacy", key: "privacy" },
  { href: "/terms", key: "terms" },
  { href: "/contact", key: "contact" },
] as const;

export function MarketingFooter({ locale }: { locale?: string }) {
  const m = getMessages(locale);

  return (
    <footer className="border-t mt-auto">
      <div className="container mx-auto px-4 py-8 flex flex-col sm:flex-row items-center justify-between gap-4 text-sm text-muted-foreground">
        <p>{formatMessage(m.marketing.footer.copyright, { year: 2026 })}</p>
        <nav className="flex items-center gap-4">
          {LINKS.map(({ href, key }) => (
            <Link key={href} href={href} className="hover:text-foreground transition-colors">
              {m.marketing.footer[key]}
            </Link>
          ))}
        </nav>
      </div>
    </footer>
  );
}
