"use client"

import { useTranslations } from "next-intl"

import { getBuildInfo } from "@/lib/build-info"

export function PublicSiteFooter() {
  const t = useTranslations("Layout")
  const year = new Date().getFullYear()
  const buildInfo = getBuildInfo()

  return (
    <footer className="border-t border-neutral-200 bg-neutral-50">
      <div className="mx-auto flex w-full max-w-6xl flex-wrap items-center justify-between gap-2 px-6 py-4 text-sm text-neutral-600">
        <p>
          {t("footer.copyright", {
            year,
          })}
        </p>
        <p>{t("footer.tagline")}</p>
        <p className="font-mono text-xs text-neutral-500">
          Build v{buildInfo.version} +sha.{buildInfo.sha}
        </p>
      </div>
    </footer>
  )
}
