/**
 * 麵包屑導航元件
 */

interface BreadcrumbProps {
  items: { label: string; active?: boolean }[];
}

export function Breadcrumb({ items }: BreadcrumbProps) {
  return (
    <div className="flex items-center gap-2 mb-2">
      {items.map((item, index) => (
        <span key={index} className="flex items-center gap-2">
          <span className={item.active ? "text-foreground" : "text-muted-foreground"}>
            {item.label}
          </span>
          {index < items.length - 1 && (
            <span className="text-muted-foreground">/</span>
          )}
        </span>
      ))}
    </div>
  );
}
