import Link from "next/link"

interface SearchChipProps {
  label: string
  href?: string
}

export function SearchChip({ label, href }: SearchChipProps) {
  const content = (
    <span className="inline-flex items-center rounded-full bg-secondary px-4 py-2 text-sm text-foreground hover:bg-muted">
      {label}
    </span>
  )

  if (href) {
    return <Link href={href}>{content}</Link>
  }

  return content
}
