/** @license MIT | @cube-dev/ui-kit v0.127.0 | Cube Dev Team */
import { _Item } from "../Item/Item.js";
import themes_default from "../../../data/themes.js";
import { tasty } from "@tenphi/tasty";
import { forwardRef } from "react";
import { jsx } from "react/jsx-runtime";

//#region src/components/content/Badge/Badge.tsx
const FILL_STYLES = Object.keys(themes_default).reduce((map, type) => {
	map[`theme=${type}`] = type === "special" ? themes_default[type].fill : themes_default[type].color;
	return map;
}, {});
const BadgeElement = tasty(_Item, {
	qa: "Badge",
	role: "status",
	size: "inline",
	styles: {
		radius: "round",
		color: "#white",
		fill: {
			"": "#primary",
			...FILL_STYLES
		},
		preset: {
			"": "tag",
			"size=xsmall": "t4",
			"size=small | size=medium": "t3",
			"size=large | size=xlarge": "t2"
		},
		border: { "type=primary": "#clear" },
		"$inline-padding": {
			"": "max($min-inline-padding, (($size - 1lh - 2bw) / 2 + $inline-compensation))",
			"size=inline": ".5x"
		},
		Label: {
			textAlign: "center",
			placeSelf: "center"
		}
	}
});
function Badge(allProps, ref) {
	let { type, theme = "special", children, size = "inline", ...props } = allProps;
	const badgeTheme = theme ?? type;
	return /* @__PURE__ */ jsx(BadgeElement, {
		ref,
		size,
		"data-type": "primary",
		"data-theme": badgeTheme,
		...props,
		children
	});
}
const _Badge = forwardRef(Badge);
_Badge.displayName = "Badge";

//#endregion
export { _Badge };
//# sourceMappingURL=Badge.js.map