<template>
  <footer class="bg-neutral-100 border-t border-neutral-200">
    <AppStripe>
      <!-- 📌 contact block -->
      <div
          class="flex flex-col sm:flex-row sm:items-center sm:justify-between
               gap-4 py-4 border-b border-neutral-300"
      >
        <!-- avatar + copy -->
        <AppHero :src="l.image"
                 alt="Ihre Gastgeberin Monika"
                 :size="16"
                 :title="l.questions"
                 :description="l.prompt">
          <!-- Contact shortcuts -->
          <div class="mt-2 space-y-1">
            <!-- Phone (phone + WhatsApp icons) -->
            <div class="flex items-center gap-2">
              <!-- Heroicons phone -->
              <UIcon name="i-heroicons-phone" class="w-4 h-4 text-sm text-neutral-600"/>
              <!-- WhatsApp icon (any Iconify set you use) -->
              <UIcon name="i-uil-whatsapp" class="w-4 h-4 text-sm text-neutral-600"/>
              <a :href="`tel:${g.business.phone.replace(/\s+/g, '')}`" class="hover:underline text-sm text-neutral-600">
                {{ g.business.phone }}
              </a>
            </div>

            <!-- E-mail -->
            <div class="flex items-center gap-2">
              <UIcon name="i-heroicons-envelope" class="w-4 h-4 text-sm text-neutral-600"/>
              <a :href="`mailto:${g.business.email}`" class="hover:underline text-sm text-neutral-600">
                {{ g.business.email }}
              </a>
            </div>
          </div>
        </AppHero>

        <div class="flex flex-col gap-4 ">
          <UButton
              :to="p('contact')"
              size="md"
              color="primary"
              variant="solid"
              trailing-icon="i-heroicons-envelope"
          >
            {{ g.button.contact }}
          </UButton>

          <UButton
              :to="p('book')"
              size="md"
              color="primary"
              variant="solid"
              trailing-icon="i-heroicons-calendar-days"
          >
            {{ g.button.book }}
          </UButton>
        </div>

      </div>

      <!-- © line -->
      <div class="pt-4 text-center text-sm text-neutral-600 flex flex-col py-4">
        <span>&copy; {{ year }} {{ g.business.name }}</span>
        <div>
          <NuxtLink :to="p('legal#imprint')" class="underline ml-2">{{ l.imprint }}</NuxtLink>
          <NuxtLink :to="p('legal#privacy')" class="underline ml-2">{{ l.privacy }}</NuxtLink>
          <NuxtLink :to="p('legal#accessibility')" class="underline ml-2">{{ l.accessibility }}</NuxtLink>
        </div>
      </div>
    </AppStripe>
  </footer>
</template>

<script setup lang="ts">
const {g, l, p} = useContentInjected()
const year = new Date().getFullYear()
</script>
