import { jsx, jsxs } from "react/jsx-runtime";
import Link from "next/link";
import { Separator } from "../../ui/separator.js";
import { useTranslations } from "next-intl";
import { sel } from "../../../lib/test/index.js";
function PublicFooter() {
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
  const t = useTranslations("footer");
  const tCommon = useTranslations("common");
  const appName = tCommon("appName");
  const footerLinks = {
    product: [
      { name: "features", href: "/features" },
      { name: "pricing", href: "/pricing" },
      { name: "support", href: "/support" },
      { name: "docs", href: "/docs" }
    ],
    company: [
      { name: "about", href: "/about" },
      { name: "blog", href: "/blog" },
      { name: "careers", href: "/careers" },
      { name: "contact", href: "/contact" }
    ],
    legal: [
      { name: "privacy", href: "/legal/privacy" },
      { name: "terms", href: "/legal/terms" },
      { name: "cookies", href: "/legal/cookies" },
      { name: "gdpr", href: "/legal/gdpr" }
    ],
    resources: [
      { name: "helpCenter", href: "/support" },
      { name: "apiDocs", href: "/docs/api" },
      { name: "status", href: "/status" },
      { name: "changelog", href: "/changelog" }
    ]
  };
  return /* @__PURE__ */ jsx("footer", { className: "border-t border-border/40 bg-background", "data-cy": sel("public.footer.container"), children: /* @__PURE__ */ jsxs("div", { className: "container max-w-7xl mx-auto px-4 py-12 md:py-16", children: [
    /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-8 md:grid-cols-4", children: [
      /* @__PURE__ */ jsxs("div", { children: [
        /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground mb-4", children: t("product") }),
        /* @__PURE__ */ jsx("ul", { className: "space-y-3", children: footerLinks.product.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
          Link,
          {
            href: link.href,
            className: "text-sm text-muted-foreground hover:text-foreground transition-colors",
            children: t(link.name)
          }
        ) }, link.name)) })
      ] }),
      /* @__PURE__ */ jsxs("div", { children: [
        /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground mb-4", children: t("company") }),
        /* @__PURE__ */ jsx("ul", { className: "space-y-3", children: footerLinks.company.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
          Link,
          {
            href: link.href,
            className: "text-sm text-muted-foreground hover:text-foreground transition-colors",
            children: t(link.name)
          }
        ) }, link.name)) })
      ] }),
      /* @__PURE__ */ jsxs("div", { children: [
        /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground mb-4", children: t("legal") }),
        /* @__PURE__ */ jsx("ul", { className: "space-y-3", children: footerLinks.legal.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
          Link,
          {
            href: link.href,
            className: "text-sm text-muted-foreground hover:text-foreground transition-colors",
            children: t(link.name)
          }
        ) }, link.name)) })
      ] }),
      /* @__PURE__ */ jsxs("div", { children: [
        /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground mb-4", children: t("resources") }),
        /* @__PURE__ */ jsx("ul", { className: "space-y-3", children: footerLinks.resources.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
          Link,
          {
            href: link.href,
            className: "text-sm text-muted-foreground hover:text-foreground transition-colors",
            children: t(link.name)
          }
        ) }, link.name)) })
      ] })
    ] }),
    /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
    /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-between gap-4 md:flex-row", children: [
      /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", "data-cy": sel("public.footer.logo"), children: [
        /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded bg-primary flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-primary-foreground font-bold text-xs", children: appName.charAt(0) }) }),
        /* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground", children: [
          "\xA9 ",
          currentYear,
          " ",
          appName,
          ". All rights reserved."
        ] })
      ] }),
      /* @__PURE__ */ jsx("div", { className: "flex items-center space-x-6 text-sm text-muted-foreground", children: /* @__PURE__ */ jsxs("p", { className: "text-center md:text-left", children: [
        "Built with \u2764\uFE0F using",
        " ",
        /* @__PURE__ */ jsx(
          Link,
          {
            href: "https://nextjs.org",
            target: "_blank",
            rel: "noreferrer",
            className: "font-medium underline underline-offset-4 hover:text-foreground transition-colors",
            children: "Next.js"
          }
        ),
        ",",
        " ",
        /* @__PURE__ */ jsx(
          Link,
          {
            href: "https://supabase.com",
            target: "_blank",
            rel: "noreferrer",
            className: "font-medium underline underline-offset-4 hover:text-foreground transition-colors",
            children: "Supabase"
          }
        ),
        " ",
        "and",
        " ",
        /* @__PURE__ */ jsx(
          Link,
          {
            href: "https://ui.shadcn.com",
            target: "_blank",
            rel: "noreferrer",
            className: "font-medium underline underline-offset-4 hover:text-foreground transition-colors",
            children: "shadcn/ui"
          }
        )
      ] }) })
    ] })
  ] }) });
}
export {
  PublicFooter
};
