<!-- Мини-карточка категории: только название и счётчик, без обложки и ссылки -->
<template>
  <div class="card-category-mini">
    <div class="card-category-mini__wrapper">
      <p class="card-category-mini__name">{{ card.title }}</p>
      <div class="card-category-mini__info">
        <span class="card-category-mini__detail">
          <UiIcon
            name="video-camera"
            size="14"
          />
          {{ $n(card.videosCount, 'compact') }}
        </span>
        <span
          v-if="featureFlags.FeatureFollowEnabled"
          class="card-category-mini__detail"
        >{{ $n(8400, 'compact') }}</span>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import type { ICategoryCard } from '../../types';

defineProps<{
  card: ICategoryCard
}>();

const featureFlags = useRuntimeConfig().public.featureFlags;
</script>

<style lang="scss">
.card-category-mini {
  display: grid;
  align-items: center;
}

.card-category-mini__name {
  @include font-base;

  font-weight: 600;
  color: $category-card-mini-name;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-category-mini__info {
  @include font-sm;

  display: flex;
  align-items: center;
  column-gap: 12px;
  margin-top: 4px;
  color: $category-card-mini-info;
}

.card-category-mini__detail {
  display: flex;
  align-items: center;
  column-gap: 4px;
}
</style>
