"use client";
'use strict';

const jsxRuntime = require('react/jsx-runtime');
const context = require('@btst/stack/context');
const defaults = require('./defaults.cjs');
const badge = require('../../../../../../../ui/src/components/badge.cjs');
const blogHooks = require('../../hooks/blog-hooks.cjs');

function TagsList() {
  const { tags } = blogHooks.useSuspenseTags();
  const { Link } = context.usePluginOverrides("blog", {
    Link: defaults.DefaultLink
  });
  const basePath = context.useBasePath();
  if (!tags || tags.length === 0) {
    return null;
  }
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2 justify-center", children: tags.map((tag) => /* @__PURE__ */ jsxRuntime.jsx(Link, { href: `${basePath}/blog/tag/${tag.slug}`, children: /* @__PURE__ */ jsxRuntime.jsx(badge.Badge, { variant: "secondary", className: "text-xs", children: tag.name }) }, tag.id)) });
}

exports.TagsList = TagsList;
