"use client";

// src/components/ui/status-badge.tsx
import { cva } from "class-variance-authority";

// src/lib/utils.ts
import { clsx } from "clsx";
import { twMerge } from "tailwind-merge";
function cn(...inputs) {
  return twMerge(clsx(inputs));
}

// src/components/ui/status-badge.tsx
import { jsx } from "react/jsx-runtime";
var statusBadgeVariants = cva(
  "inline-flex shrink-0 items-center justify-center font-semibold leading-none tracking-wide uppercase select-none border border-transparent",
  {
    variants: {
      status: {
        beta: (
          // Warm yellow — matches sidebar Beta. HC/forced-colors fall back to
          // system tokens so the chip stays visible under custom contrast.
          "bg-yellow-400 text-yellow-950 hc:bg-transparent hc:border-foreground hc:text-foreground forced-colors:bg-[Canvas] forced-colors:text-[CanvasText] forced-colors:border-[CanvasText]"
        ),
        new: "bg-brand text-brand-foreground hc:bg-transparent hc:border-foreground hc:text-foreground forced-colors:bg-[Highlight] forced-colors:text-[HighlightText] forced-colors:border-[HighlightText]",
        alpha: "bg-orange-500 text-white hc:bg-transparent hc:border-foreground hc:text-foreground forced-colors:bg-[Canvas] forced-colors:text-[CanvasText] forced-colors:border-[CanvasText]",
        preview: "bg-sky-500 text-white hc:bg-transparent hc:border-foreground hc:text-foreground forced-colors:bg-[Canvas] forced-colors:text-[CanvasText] forced-colors:border-[CanvasText]",
        deprecated: "bg-muted text-muted-foreground border-border hc:border-foreground forced-colors:bg-[Canvas] forced-colors:text-[GrayText] forced-colors:border-[GrayText]"
      },
      size: {
        xs: "h-3.5 min-w-3.5 px-1 text-[9px] rounded-sm",
        sm: "h-4   min-w-4   px-1.5 text-[10px] rounded-full",
        md: "h-5   min-w-5   px-1.5 text-[11px] rounded-full"
      },
      variant: {
        pill: "",
        // `dot` — same color, no label, for collapsed sidebars or tight chips.
        dot: "size-2 min-w-0 p-0 rounded-full"
      }
    },
    defaultVariants: {
      status: "beta",
      size: "sm",
      variant: "pill"
    }
  }
);
var STATUS_LABEL = {
  beta: "Beta",
  new: "New",
  alpha: "Alpha",
  preview: "Preview",
  deprecated: "Deprecated"
};
function StatusBadge({
  className,
  status = "beta",
  size = "sm",
  variant = "pill",
  label,
  "aria-label": ariaLabel,
  ...props
}) {
  const visibleLabel = label ?? STATUS_LABEL[status];
  const a11yLabel = ariaLabel ?? visibleLabel;
  return /* @__PURE__ */ jsx(
    "span",
    {
      "data-slot": "status-badge",
      "data-status": status,
      "data-variant": variant,
      "aria-label": a11yLabel,
      className: cn(statusBadgeVariants({ status, size, variant }), className),
      ...props,
      children: variant === "dot" ? /* @__PURE__ */ jsx("span", { className: "sr-only", children: a11yLabel }) : visibleLabel
    }
  );
}
export {
  StatusBadge,
  statusBadgeVariants
};
//# sourceMappingURL=status-badge.js.map