/*! ratio-ui · design system for knowledge sharing · https://github.com/losol/ratio-ui · (c) 2026 Losol AS · MPL-2.0 */
import { cn } from "../../utils/cn.js";
import "react";
import { jsx, jsxs } from "react/jsx-runtime";
//#region src/core/Badge/Badge.tsx
var filledStatusClasses = {
	neutral: "bg-neutral-700 dark:bg-neutral-800 text-white",
	info: "bg-info text-white",
	success: "bg-success text-white",
	warning: "bg-warning text-white",
	error: "bg-error text-white"
};
var subtleStatusClasses = {
	neutral: "bg-card border border-border-1 text-(--text-muted)",
	info: "bg-(--info-bg) border border-(--info-border) text-(--info-text)",
	success: "bg-(--success-bg) border border-(--success-border) text-(--success-text)",
	warning: "bg-(--warning-bg) border border-(--warning-border) text-(--warning-text)",
	error: "bg-(--error-bg) border border-(--error-border) text-(--error-text)"
};
var Badge = ({ children, className, status = "neutral", variant = "filled", block = false, definition = false, label }) => {
	const isSubtle = variant === "subtle";
	const variantClasses = isSubtle ? subtleStatusClasses[status] : filledStatusClasses[status];
	const base = cn(block && "block", variantClasses, "leading-none", isSubtle ? "font-mono text-[10px] uppercase tracking-wider font-bold rounded-full" : "text-xs rounded");
	if (definition && label) return /* @__PURE__ */ jsxs("span", {
		className: cn(base, "flex overflow-hidden", className),
		children: [/* @__PURE__ */ jsx("dt", {
			className: cn("px-2 py-2 font-medium uppercase tracking-wide", isSubtle ? "bg-(--text-muted)/10" : "bg-black/20"),
			children: label
		}), /* @__PURE__ */ jsx("dd", {
			className: "px-2 py-2 m-0",
			children
		})]
	});
	return /* @__PURE__ */ jsx("span", {
		className: cn(base, isSubtle ? "px-2 py-1" : "p-2", className),
		children
	});
};
//#endregion
export { Badge };

//# sourceMappingURL=Badge.js.map