<template>
  <nav class="rounded-3xl border border-slate-200 bg-white p-5 text-slate-900 shadow-2xl backdrop-blur transition-colors dark:border-white/10 dark:bg-white/5 dark:text-white">
    <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-500 dark:text-slate-300">
        Seite
        <span class="text-xl font-semibold text-slate-900 dark:text-white">{{ currentPage }}</span>
        <span class="text-slate-400 dark:text-slate-500">/</span>
        <span class="text-lg text-slate-700 dark: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-slate-300 bg-white px-4 py-2 text-sm font-semibold text-slate-900 transition hover:border-cyan-300 hover:text-cyan-600 focus:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300 disabled:opacity-50 dark:border-white/20 dark:bg-white/10 dark:text-white dark:hover:text-cyan-200"
          @click="$emit('prevPage')"
          :disabled="currentPage === 1"
        >
          <font-awesome-icon :icon="['fas', 'arrow-left']" class="h-4 w-4" />
          {{ __('api.navigation.previous') }}
        </button>
        <button
          type="button"
          class="inline-flex items-center gap-2 rounded-full border border-emerald-300 bg-emerald-50 px-4 py-2 text-sm font-semibold text-emerald-700 transition hover:bg-emerald-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-300 disabled:opacity-50 dark:bg-emerald-400/20 dark:text-emerald-100 dark:hover:bg-emerald-400/40"
          @click="$emit('nextPage')"
          :disabled="currentPage === totalPages"
        >
          {{ __('api.navigation.next') }}
          <font-awesome-icon :icon="['fas', 'arrow-right']" class="h-4 w-4" />
        </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>
