import { Circle, type LucideIcon } from "lucide-react"

import { cn } from "@/lib/utils"

type SubMenuIconProps = {
  icon: LucideIcon
  className?: string
}

/** Bullet-style Circle icons stay small; named icons use standard submenu size. */
export function SubMenuIcon({ icon: Icon, className }: SubMenuIconProps) {
  const isBullet = Icon === Circle

  return (
    <Icon
      className={cn(
        isBullet
          ? "size-2 shrink-0 stroke-primary text-primary"
          : "size-4 shrink-0 text-muted-foreground",
        className
      )}
    />
  )
}
