"use client"

import { cn } from "@/lib/utils"
import { normalizeNavColorClass } from "@/lib/nav-color"

export function NavColorDot({
  color,
  className,
  rounded = "sm",
}: {
  color: string
  className?: string
  rounded?: "sm" | "full"
}) {
  const colorClass = normalizeNavColorClass(color)
  return (
    <span
      className={cn(
        "block size-3 shrink-0 border border-black/10",
        rounded === "full" ? "rounded-full" : "rounded-sm",
        colorClass,
        className
      )}
      aria-hidden
    />
  )
}
