import { a as IconSize, n as AnalyticsId, r as FormOnColor } from "./constants2.js";
import { t as getColor } from "./color.js";
import { r as LazyIcon } from "./LazyIcon.js";
import classNames from "classnames";
import { jsx, jsxs } from "react/jsx-runtime";
import styles from "./components/StatusDot/styles.module.scss";
let StatusDotOnColor = /* @__PURE__ */ function(StatusDotOnColor$1) {
	StatusDotOnColor$1[StatusDotOnColor$1["onwhite"] = FormOnColor.onwhite] = "onwhite";
	StatusDotOnColor$1[StatusDotOnColor$1["ondark"] = FormOnColor.ondark] = "ondark";
	return StatusDotOnColor$1;
}({});
let StatusDotVariant = /* @__PURE__ */ function(StatusDotVariant$1) {
	StatusDotVariant$1["success"] = "success";
	StatusDotVariant$1["inprocess"] = "inprocess";
	StatusDotVariant$1["exception"] = "exception";
	StatusDotVariant$1["unknown"] = "unknown";
	StatusDotVariant$1["inspected"] = "inspected";
	StatusDotVariant$1["cancelled"] = "cancelled";
	StatusDotVariant$1["alert"] = "alert";
	StatusDotVariant$1["transparent"] = "transparent";
	StatusDotVariant$1["info"] = "info";
	StatusDotVariant$1["group"] = "group";
	StatusDotVariant$1["recurring"] = "recurring";
	StatusDotVariant$1["noaccess"] = "noaccess";
	StatusDotVariant$1["draft"] = "draft";
	StatusDotVariant$1["hidden"] = "hidden";
	StatusDotVariant$1["login"] = "login";
	StatusDotVariant$1["attachment"] = "attachment";
	StatusDotVariant$1["active"] = "active";
	StatusDotVariant$1["pending"] = "pending";
	StatusDotVariant$1["inactive"] = "inactive";
	StatusDotVariant$1["ready"] = "ready";
	return StatusDotVariant$1;
}({});
var StatusDotIcon = ({ onColor, variant = "info" }) => {
	const iconProps = {
		color: onColor === StatusDotOnColor.ondark ? getColor("white") : getColor("black"),
		size: IconSize.XXSmall,
		onColor,
		className: classNames({
			[styles[`statusdot__dot--${variant}`]]: typeof variant !== "undefined",
			[styles["statusdot__dot--on-dark"]]: onColor === StatusDotOnColor.ondark
		})
	};
	switch (variant) {
		case StatusDotVariant.success: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotCheckmark"
		});
		case StatusDotVariant.inprocess: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotHalfDisc"
		});
		case StatusDotVariant.exception: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotTriangle"
		});
		case StatusDotVariant.unknown: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotQuestionMark"
		});
		case StatusDotVariant.inspected: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotLookingGlass"
		});
		case StatusDotVariant.cancelled: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotX"
		});
		case StatusDotVariant.alert: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotExclamationMark"
		});
		case StatusDotVariant.transparent: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotOutline"
		});
		case StatusDotVariant.info: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotInfo"
		});
		case StatusDotVariant.group: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotGroup"
		});
		case StatusDotVariant.recurring: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotCircleArrows"
		});
		case StatusDotVariant.noaccess: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotNoAccess"
		});
		case StatusDotVariant.draft: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotPencil"
		});
		case StatusDotVariant.hidden: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotNoEye"
		});
		case StatusDotVariant.login: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotLogin"
		});
		case StatusDotVariant.attachment: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotAttachment"
		});
		case StatusDotVariant.active: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotFill"
		});
		case StatusDotVariant.pending: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotDot"
		});
		case StatusDotVariant.inactive: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotOutline"
		});
		case StatusDotVariant.ready: return /* @__PURE__ */ jsx(LazyIcon, {
			...iconProps,
			iconName: "DotOutline"
		});
	}
	return null;
};
var StatusDot = (props) => {
	const { id, onColor = StatusDotOnColor.onwhite, variant = StatusDotVariant.info, text, className, testId, ref } = props;
	const statusDotClasses = classNames(styles["statusdot"], className);
	const labelClasses = classNames(styles["statusdot__label"], { [styles["statusdot__label--on-dark"]]: onColor === StatusDotOnColor.ondark });
	return /* @__PURE__ */ jsxs("span", {
		id,
		ref,
		className: statusDotClasses,
		"data-testid": testId,
		"data-analyticsid": AnalyticsId.StatusDot,
		children: [/* @__PURE__ */ jsx("span", {
			className: styles["statusdot__dot"],
			"data-testid": testId + "-dot",
			children: /* @__PURE__ */ jsx(StatusDotIcon, {
				onColor,
				variant
			})
		}), /* @__PURE__ */ jsx("span", {
			className: labelClasses,
			children: text
		})]
	});
};
var StatusDot_default$1 = StatusDot;
export { StatusDotOnColor as n, StatusDotVariant as r, StatusDot_default$1 as t };

//# sourceMappingURL=StatusDot.js.map