import { ChevronLeft } from "lucide-react"
import Link from "@/components/common/versioned-link"

export default function SectionHeader({ title, linkLabel = "همه", href }: { title: string; linkLabel?: string; href?: string }) {
  return (
    <div className="flex items-center justify-between mb-2.5">
      <h2 className="text-title-3 font-extrabold">{title}</h2>
      {href && linkLabel && (
        <Link href={href} aria-label={`${linkLabel}: ${title}`} className="flex items-center h-11 -my-2.5 px-2 -mx-2 text-caption font-bold text-sienna">
          {linkLabel}
          <ChevronLeft className="w-4 h-4" aria-hidden="true" />
        </Link>
      )}
    </div>
  )
}
