<template>
  <nav class="rounded-3xl border border-white/10 bg-white/5 p-5 text-white shadow-2xl backdrop-blur">
    <div class="flex flex-wrap items-center justify-between gap-4">
      <div class="flex items-center gap-2 text-xs uppercase tracking-[0.4em] text-slate-300">
        Seite
        <span class="text-xl font-semibold text-white">{{ currentPage }}</span>
        <span class="text-slate-500">/</span>
        <span class="text-lg text-slate-200">{{ totalPages }}</span>
      </div>
      <div class="flex flex-wrap items-center gap-3">
        <button
          type="button"
          class="inline-flex items-center gap-2 rounded-full border border-white/20 bg-white/10 px-4 py-2 text-sm font-semibold text-white transition hover:border-cyan-300 hover:text-cyan-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300 disabled:opacity-50"
          @click="$emit('prevPage')"
          :disabled="currentPage === 1"
        >
          <svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
            <path stroke-linecap="round" stroke-linejoin="round" d="m15.75 19.5-7.5-7.5 7.5-7.5" />
          </svg>
          {{ __('navigation.previous') }}
        </button>
        <button
          type="button"
          class="inline-flex items-center gap-2 rounded-full border border-emerald-300 bg-emerald-400/20 px-4 py-2 text-sm font-semibold text-emerald-100 transition hover:bg-emerald-400/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-300 disabled:opacity-50"
          @click="$emit('nextPage')"
          :disabled="currentPage === totalPages"
        >
          {{ __('navigation.next') }}
          <svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
            <path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" />
          </svg>
        </button>
      </div>
    </div>
  </nav>
</template>

<script setup>
const props = defineProps({
  currentPage: {
    type: Number,
    required: true,
  },
  totalPages: {
    type: Number,
    required: true,
  },
});

const emits = defineEmits(['prevPage', 'nextPage']);
</script>
