/**
 * Copyright IBM Corp. 2020, 2026
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */

const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_index = require("../../node_modules/classnames/index.js");
const require_settings = require("../../settings.js");
const require_devtools = require("../../global/js/utils/devtools.js");
let react = require("react");
react = require_runtime.__toESM(react);
let prop_types = require("prop-types");
prop_types = require_runtime.__toESM(prop_types);
let _carbon_react_icons = require("@carbon/react/icons");
//#region src/components/DecoratorBase/DecoratorIcon.jsx
/**
* Copyright IBM Corp. 2024, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
const blockClass = `${require_settings.pkg.prefix}--decorator-icon`;
const componentName = "DecoratorIcon";
const defaults = {
	magnitude: "unknown",
	small: false
};
/**
* The shape and color of the Decorator's icon.
*/
let DecoratorIcon = react.default.forwardRef(({ className, magnitude = defaults.magnitude, small = defaults.small, ...rest }, ref) => {
	let Icon;
	switch (magnitude) {
		case "benign":
			Icon = _carbon_react_icons.CircleFill;
			break;
		case "low":
			Icon = _carbon_react_icons.SquareFill;
			break;
		case "medium":
			Icon = _carbon_react_icons.DiamondFill;
			break;
		case "high":
			Icon = _carbon_react_icons.Caution;
			break;
		case "critical":
			Icon = _carbon_react_icons.ChevronMini;
			break;
		default:
			Icon = _carbon_react_icons.CircleStroke;
			break;
	}
	return /* @__PURE__ */ react.default.createElement(Icon, {
		...rest,
		"aria-hidden": true,
		className: (0, import_classnames.default)(blockClass, className, `${blockClass}__magnitude-${magnitude}`, { [`${blockClass}--sm`]: small }),
		focusable: false,
		ref,
		viewBox: magnitude === "critical" ? "8 8 8 8" : "0 0 16 16",
		...require_devtools.getDevtoolsProps(componentName)
	});
});
DecoratorIcon = require_settings.pkg.checkComponentEnabled(DecoratorIcon, componentName);
DecoratorIcon.displayName = componentName;
DecoratorIcon.propTypes = {
	/**
	* Provide an optional class to be applied to the containing node.
	*/
	className: prop_types.default.string,
	/**
	* Determines the shape and color of the icon.
	*/
	magnitude: prop_types.default.oneOf([
		"unknown",
		"benign",
		"low",
		"medium",
		"high",
		"critical"
	]),
	/**
	* Reduce the size of the icon in proportion to a smaller Decorator.
	*/
	small: prop_types.default.bool
};
//#endregion
Object.defineProperty(exports, "DecoratorIcon", {
	enumerable: true,
	get: function() {
		return DecoratorIcon;
	}
});
