<template>
  <div class="error-page">
    <div class="error-page__content">
      <h1 class="error-page__code">{{ error?.statusCode || 404 }}</h1>
      <p class="body-text--gray error-page__message">
        {{ error?.message || 'Страница не найдена' }}
      </p>
      <NuxtLink to="/" class="btn btn--primary btn--md">
        На главную
      </NuxtLink>
    </div>
  </div>
</template>

<script setup lang="ts">
defineProps<{
  error?: {
    statusCode?: number
    message?: string
  }
}>()
</script>

<style scoped>
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.error-page__content {
  text-align: center;
}

.error-page__code {
  font-family: var(--font-display);
  font-size: 120px;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 16px;
}

.error-page__message {
  margin-bottom: 32px;
}
</style>
