"use client";

import Link from "next/link";
import { ChevronLeft } from "lucide-react";

export function CommunicationBreadcrumbs({
  current,
  parent,
}: {
  current: string;
  parent?: { href: string; label: string };
}) {
  return (
    <nav className="mb-4 flex items-center gap-2 text-xs text-[var(--muted)]" aria-label="مسیر">
      <Link href="/communication" className="hover:text-[var(--communication-accent)]">
        تربت ارتباط
      </Link>
      {parent ? (
        <>
          <ChevronLeft className="h-3 w-3 rotate-180" />
          <Link href={parent.href} className="hover:text-[var(--communication-accent)]">
            {parent.label}
          </Link>
        </>
      ) : null}
      <ChevronLeft className="h-3 w-3 rotate-180" />
      <span className="font-medium text-secondary">{current}</span>
    </nav>
  );
}
