// BEGIN CHANGE: link de player com outfit ao lado (uso em qualquer lista)
"use client";

import Link from "next/link";
import { Outfit } from "@/components/Outfit";
import type { Look, OutfitSizeKey } from "@/lib/api";

export function PlayerName({
  name,
  look,
  size = "inline",
  className = "",
}: {
  name: string;
  look?: Look | null;
  size?: OutfitSizeKey;
  className?: string;
}) {
  return (
    <Link
      href={`/character/?name=${encodeURIComponent(name)}`}
      className={`inline-flex items-center gap-2 hover:text-brand ${className}`}
    >
      {look && <Outfit look={look} size={size} alt={name} />}
      <span className="font-medium">{name}</span>
    </Link>
  );
}
// END CHANGE
