import Link from "next/link";
import { ENTRY_PATHS } from "~/lib/data";

export function SiteFooter() {
  return (
    <footer className="border-t border-neutral-200 bg-neutral-50 px-4 py-8 sm:px-6">
      <div className="mx-auto max-w-lg sm:max-w-2xl lg:max-w-4xl">
        <p className="text-center text-xs text-neutral-400">
          © {new Date().getFullYear()} Nomadro · 数字游民操作系统
        </p>
        <div className="mt-4 flex flex-wrap justify-center gap-x-4 gap-y-2">
          {ENTRY_PATHS.map((path) => (
            <Link
              key={path.id}
              href={path.href}
              target="_blank"
              rel="noopener noreferrer"
              className="text-xs text-neutral-500 active:text-violet-600"
            >
              {path.emoji} {path.title.split(" · ")[0]}
            </Link>
          ))}
          <Link href="/about" className="text-xs text-neutral-500 active:text-violet-600">
            关于
          </Link>
          <Link href="/contact" className="text-xs text-neutral-500 active:text-violet-600">
            联系
          </Link>
        </div>
      </div>
    </footer>
  );
}
