<template>
  <main>
    <div v-if="error">
      <CommonErrorNotFound v-if="error.statusCode === 404" />
      <div v-else>Une erreur s'est produite...</div>
    </div>

    <nuxt-link to="/">
      <v-btn class="ot-button"> Retour </v-btn>
    </nuxt-link>
  </main>
</template>

<script setup lang="ts">
import type { NuxtError } from '#app'

const error: Ref<NuxtError | null | undefined> = useError()
</script>

<style lang="scss">
.ot-button {
  border-radius: 6px;
  height: 48px;
  font-size: 0.8rem;
  font-weight: 300;
  background: var(--secondary-color) !important;
  color: var(--on-neutral-color) !important;
}
</style>
