---
import Default from "@astrojs/starlight/components/Footer.astro";
import {getLangFromUrl, useTranslations} from "../i18n/utils";

const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
---

<Default><slot /></Default>
<div class="flex flex-col gap-8">
  <div class="flex flex-col gap-4">
    <div class="text-gray-500">{t("footer.fundingFrom")}:</div>
    <div
      class="flex flex-wrap gap-5 md:gap-10 items-start dark:bg-white dark:px-4 py-5 rounded-xl"
    >
      <a href="https://www.bmbf.de" target="_blank">
        <img
          src={lang === "de" ? "/BMFTR-de.webp" : "/BMFTR-en.webp"}
          alt="Bundesministerium für Forschung, Technologie und Raumfahrt"
          class="h-20 w-auto block"
        />
      </a>
      <a href="https://prototypefund.de" target="_blank">
        <img
          src="/PrototypeFund.png"
          alt="Prototype Fund"
          class="h-10 w-auto block"
        />
      </a>
    </div>
  </div>

  <div>
    <a href="https://ludwigweise.de/impressum">{t("footer.imprint")}</a> ·
    <a href="https://ludwigweise.de/datenschutz">{t("footer.privacy")}</a> ·
    <a href="/press">{t("footer.press")}</a>
  </div>
</div>
