import { a as IconSize, n as AnalyticsId } from "../../constants2.js";
import { t as palette } from "../../palette.js";
import { t as Icon_default } from "../../Icon.js";
import { t as LazyIcon_default } from "../../LazyIcon.js";
import classNames from "classnames";
import { jsx, jsxs } from "react/jsx-runtime";
import styles from "./styles.module.scss";
let TagSize = /* @__PURE__ */ function(TagSize$1) {
	TagSize$1["medium"] = "medium";
	TagSize$1["large"] = "large";
	return TagSize$1;
}({});
let TagVariant = /* @__PURE__ */ function(TagVariant$1) {
	TagVariant$1["normal"] = "normal";
	TagVariant$1["oncolor"] = "oncolor";
	TagVariant$1["emphasised"] = "emphasised";
	return TagVariant$1;
}({});
var Tag = (props) => {
	const { children, size = TagSize.medium, color = "blueberry", svgIcon, variant = "normal", testId } = props;
	return /* @__PURE__ */ jsxs("span", {
		className: classNames(styles.tag, styles[`tag--${size}`], styles[`tag--${color}`], {
			[styles["tag--has-icon"]]: svgIcon,
			[styles["tag--emphasised"]]: variant == TagVariant.emphasised
		}),
		"data-testid": testId,
		"data-analyticsid": AnalyticsId.Tag,
		children: [svgIcon && (typeof svgIcon === "string" ? /* @__PURE__ */ jsx(LazyIcon_default, {
			iconName: svgIcon,
			size: IconSize.XXSmall,
			color: palette[`${color}800`],
			className: styles.tag__icon
		}) : /* @__PURE__ */ jsx(Icon_default, {
			svgIcon,
			size: IconSize.XXSmall,
			color: palette[`${color}800`],
			className: styles.tag__icon
		})), children]
	});
};
var Tag_default = Tag;
export { TagSize, TagVariant, Tag_default as default };

//# sourceMappingURL=index.js.map