import { i as e, r as t, t as n } from "./uiClasses-UkaejTdf.js";
import { o as r } from "./flex-C7njxZ74.js";
import { TextOverflow as i } from "../text/index.js";
import { Children as a, Fragment as o } from "react";
import { cn as s } from "@ryuzaki13/react-foundation-lib/utils";
import { jsx as c, jsxs as l } from "react/jsx-runtime";
import { XIcon as u } from "lucide-react";
var d = {
	badge: "qBtmnH",
	passive: "p-HsHY",
	sizeXs: "u9tQAE",
	sizeSm: "FRScRz",
	sizeMd: "W13uQO",
	sizeLg: "_3IRcM9",
	sizeXl: "R3ybI7",
	content: "DdWAaC",
	removeButton: "_5cXBQF"
}, f = {
	xs: d.sizeXs,
	sm: d.sizeSm,
	md: d.sizeMd,
	lg: d.sizeLg,
	xl: d.sizeXl
};
function p({ children: r, size: a = "sm", tone: o, appearance: p, className: m, onRemove: h }) {
	let g = o ?? "neutral", _ = e({
		tone: o,
		appearance: p,
		fallbackTone: g,
		fallbackAppearance: g === "neutral" ? "outline" : "solid"
	});
	return /* @__PURE__ */ l("div", {
		className: s(d.badge, f[a], t(_.tone), n(_.appearance), !h && d.passive, m),
		children: [/* @__PURE__ */ c(i, {
			maxChar: 25,
			placement: "top",
			block: !0,
			textWrapProps: { className: d.content },
			children: String(r)
		}), h && /* @__PURE__ */ c("button", {
			type: "button",
			onClick: h,
			className: d.removeButton,
			"aria-label": "Удалить бейдж",
			"data-ui": "badge-remove-button",
			"data-action": "remove-badge",
			children: /* @__PURE__ */ c(u, {})
		})]
	});
}
//#endregion
//#region src/badge/BadgeList.tsx
function m({ children: e }) {
	return /* @__PURE__ */ c(r, {
		inline: !0,
		wrap: !0,
		gap: "sm",
		align: "baseline",
		children: a.map(e, (e, t) => /* @__PURE__ */ c(o, { children: e }, t))
	});
}
//#endregion
export { p as n, m as t };

//# sourceMappingURL=badge-DMM8cOHd.js.map