import { jsx } from 'react/jsx-runtime';
import { c as cva } from '../index-D7Zy7P05.js';
import { c as cn } from '../utils-DdHUxIdC.js';
import { S as Slot } from '../index-CfriMyrd.js';
import 'react';
import '../index-BtkPdosV.js';

const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
    variants: {
        variant: {
            default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
            secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
            destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
            outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
            ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
            link: "text-primary underline-offset-4 hover:underline",
        },
    },
    defaultVariants: {
        variant: "default",
    },
});
function Badge$1({ className, variant = "default", asChild = false, ...props }) {
    const Comp = asChild ? Slot : "span";
    return (jsx(Comp, { "data-slot": "badge", "data-variant": variant, className: cn(badgeVariants({ variant }), className), ...props }));
}

const extendedBadgeVariants = cva("", {
    variants: {
        variant: {
            // --- Semantic (passthrough to shadcn) ---
            default: "",
            secondary: "",
            destructive: "",
            outline: "",
            ghost: "",
            link: "",
            // --- Color ---
            gray: "bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-gray-100",
            "gray-subtle": "bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-300",
            blue: "bg-blue-600 text-white dark:bg-blue-500",
            "blue-subtle": "bg-blue-50 text-blue-700 dark:bg-blue-950/50 dark:text-blue-300",
            purple: "bg-purple-700 text-white dark:bg-purple-600",
            "purple-subtle": "bg-purple-50 text-purple-700 dark:bg-purple-950/50 dark:text-purple-300",
            amber: "bg-amber-400 text-amber-950 dark:bg-amber-500 dark:text-amber-950",
            "amber-subtle": "bg-amber-50 text-amber-700 dark:bg-amber-950/50 dark:text-amber-300",
            red: "bg-red-600 text-white dark:bg-red-500",
            "red-subtle": "bg-red-50 text-red-700 dark:bg-red-950/50 dark:text-red-300",
            pink: "bg-pink-600 text-white dark:bg-pink-500",
            "pink-subtle": "bg-pink-50 text-pink-700 dark:bg-pink-950/50 dark:text-pink-300",
            green: "bg-green-600 text-white dark:bg-green-500",
            "green-subtle": "bg-green-50 text-green-700 dark:bg-green-950/50 dark:text-green-300",
            teal: "bg-teal-600 text-white dark:bg-teal-500",
            "teal-subtle": "bg-teal-50 text-teal-700 dark:bg-teal-950/50 dark:text-teal-300",
        },
        size: {
            sm: "h-4 px-1.5 py-0 text-[0.65rem] gap-0.5 [&>svg]:size-2.5!",
            default: "",
            lg: "h-6 px-3 py-0.5 text-sm gap-1.5 [&>svg]:size-4!",
        },
        shape: {
            pill: "",
            rounded: "rounded",
        },
    },
    defaultVariants: {
        variant: "default",
        size: "default",
        shape: "pill",
    },
});
// Semantic variants that map to shadcn's built-in variants
const SHADCN_VARIANTS = new Set([
    "default",
    "secondary",
    "destructive",
    "outline",
    "ghost",
    "link",
]);
const Badge = ({ variant = "default", size = "default", shape = "pill", className, ...props }) => {
    // Pass semantic variants to shadcn, color variants override via className
    const shadcnVariant = SHADCN_VARIANTS.has(variant) ? variant : undefined;
    return (jsx(Badge$1, { variant: shadcnVariant, className: cn(extendedBadgeVariants({ variant, size, shape }), className), ...props }));
};

export { Badge, extendedBadgeVariants as badgeVariants };
//# sourceMappingURL=Badge.js.map
