import type { ArticleTag } from '@/lib/types'

interface Props {
  tags: ArticleTag[]
}

export default function TagRow({ tags }: Props) {
  if (!tags || tags.length === 0) return null

  return (
    <div className="flex flex-wrap gap-2 pt-7 border-t border-border mt-8">
      {tags.map(({ tags_id: tag }) => (
        <span
          key={tag.id}
          className="bg-bg-card border border-border text-text-secondary text-xs px-3 py-1 rounded-sm hover:border-accent hover:text-accent transition-colors cursor-default"
        >
          {tag.name}
        </span>
      ))}
    </div>
  )
}
