Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_chunk = require("../chunk-BN4qSVkS.cjs");
const require_styles_themes = require("../styles/themes.cjs");
const require_styles_common = require("../styles/common.cjs");
const require_components_Icon_Icon = require("./Icon/Icon.cjs");
const require_utils_toReactNodes_toReactNodes = require("../utils/toReactNodes/toReactNodes.cjs");
const require_utils_toReactNodes_setReactNodesTypography = require("../utils/toReactNodes/setReactNodesTypography.cjs");
let _emotion_styled = require("@emotion/styled");
_emotion_styled = require_chunk.__toESM(_emotion_styled);
let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
//#region src/components/Badge.tsx
function Badge({ content: contentProp, kind, icon, ml = 0, mr = 0, size = "sm", block = false, typography: typographyProp }) {
	const content = require_utils_toReactNodes_toReactNodes.toReactNodes(require_utils_toReactNodes_setReactNodesTypography.setDefaultReactNodesTypography(contentProp, { default: {
		type: typographyProp?.type || "Label Moderate",
		size: typographyProp?.size || "Small",
		color: typographyProp?.color || (kind === "danger" ? "danger" : kind === "success" ? "white" : "text")
	} }));
	return contentProp ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)(StyledBadge, {
		kind,
		ml,
		mr,
		size,
		block,
		children: [icon ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_components_Icon_Icon.Icon, {
			name: icon.name,
			width: 20,
			color: icon.color ? icon.color : kind === "danger" ? "danger" : kind === "success" ? "success" : void 0
		}) : null, /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(BadgeContent, { children: content })]
	}) : null;
}
const badgeSmVPadding = 2;
const badgeSmHPadding = 6;
const StyledBadge = _emotion_styled.default.div`
  ${({ size }) => require_styles_common.standardBorderRadius(size === "sm" ? 4 : 12)}
  ${({ ml }) => ml === 0 ? "" : `margin-left: ${ml}px;`}
  ${({ mr }) => mr === 0 ? "" : `margin-right: ${mr}px;`}

  display: ${({ block }) => block ? "flex" : "inline-flex"};
  gap: ${({ size }) => size === "sm" ? badgeSmHPadding : 12}px;
  align-items: center;
  padding: ${({ size }) => size === "sm" ? `2px ${badgeSmHPadding}px` : "12px 16px"};
  background-color: ${({ theme, kind }) => {
	if (kind === "danger") return require_styles_themes.getColor(theme, "red42a10");
	else if (kind === "success") return require_styles_themes.getColor(theme, "success");
	else return require_styles_themes.getColor(theme, theme.badge.bg);
}};
`;
const BadgeContent = _emotion_styled.default.div``;
//#endregion
exports.Badge = Badge;
exports.badgeSmVPadding = badgeSmVPadding;
