import LabelEntity from "@/lib/label/domain/labelEntity";

export default function CompactLabel({ labels }: { labels: LabelEntity[] }) {
  function generateTitle(labels: LabelEntity[]): string {
    return labels.map((e) => e.name).join("\n");
  }

  return (
    <div
      className="flex cursor-default flex-row items-center gap-x-1 rounded-full bg-gray-300 px-2 py-0.5"
      title={generateTitle(labels)}
    >
      <span className="text-xs text-gray-800">{`${labels.length}+`}</span>
    </div>
  );
}
