---
import { getUniqueTags, getAllPosts } from '../../libs/posts.ts'

type Props = { className?: string; };
const { className }: Props = Astro.props;
const posts = getAllPosts();
const uniqueTags = getUniqueTags(posts);
---

<div  id="tags" class={`d-md-flex align-items-md-center text-center ${className}`}>
  {uniqueTags && uniqueTags.length > 0 && uniqueTags.map((tag: any) => (
      <a href={`/blog/${tag}/`}
        class="text-white tag-filter btn btn-soft-secondary rounded-pill m-1">
        {tag.toUpperCase()}
      </a>
    ))}
</div>
