import { Breadcrumbs } from '@/components/layout/Breadcrumbs'

export default async function TagBreadcrumb({ params }: { params: Promise<{ tag: string }> }) {
  const { tag } = await params
  const tagName = tag
    .split('-')
    .map(word => word.charAt(0).toUpperCase() + word.slice(1))
    .join(' ')

  return (
    <Breadcrumbs
      items={[
        {
          label: 'Tag-uri',
          href: '/tags',
        },
        {
          label: tagName,
          href: `/tags/${tag}`,
          current: true,
        },
      ]}
    />
  )
}
