<template>
  <div class="cpTableEmptyState">
    <div class="cpTableEmptyState__wrapper">
      <figure class="cpTableEmptyState__icon"><cp-icon type="search" /></figure>
      <p class="cpTableEmptyState__headline">
        <strong>{{ placeholder }}</strong>
      </p>
      <p class="cpTableEmptyState__description">There aren't any results for that query.</p>
    </div>
  </div>
</template>

<script setup lang="ts">
interface Props {
  placeholder: string
}

defineProps<Props>()
</script>

<style lang="scss">
.cpTableEmptyState {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10vh var(--cp-spacing-xl);

  &__icon {
    display: inline-block;
    padding: var(--cp-spacing-xl);
    border-radius: var(--cp-radius-sm);
    margin-bottom: var(--cp-spacing-2xl);
    background-color: var(--cp-background-secondary);
    color: var(--cp-foreground-secondary);
  }

  &__headline {
    margin-bottom: var(--cp-spacing-md);
    font-size: var(--cp-text-size-xl);
  }

  &__description {
    color: var(--cp-text-secondary);
  }
}
</style>
