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

//# sourceMappingURL=badge-Cri0-kVK.js.map