<script lang="ts" setup>
import Empty from '@/assets/empty.svg?component';

const props = defineProps<{
  title: string;
  description?: string;
}>();
</script>

<template>
  <div class="empty-screen">
    <div class="empty-screen__img">
      <Empty />
    </div>

    <h1 class="empty-screen__title">{{ props.title }}</h1>
    <p v-if="props.description" class="empty-screen__description">
      {{ props.description }}
    </p>
  </div>
</template>

<style lang="scss" scoped>
.empty-screen {
  display: flex;
  align-items: center;
  flex-direction: column;

  &__img {
    font-size: var(--empty-screen-image-size, 1.2em);
    width: 10em;
    height: 10em;

    svg {
      width: 100%;
      height: 100%;
    }
  }

  &__title {
    font-size: 1.4em;
    text-align: center;
    font-weight: bold;
    margin-bottom: 0;
  }

  &__description {
    margin-top: 0.5em;
    font-size: 1em;
    text-align: center;
    font-weight: normal;
  }
}
</style>
