/**
 * 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_settings = require("../../settings.js");
const require_devtools = require("../../global/js/utils/devtools.js");
const require_props_helper = require("../../global/js/utils/props-helper.js");
const require_DecoratorBase = require("../DecoratorBase/DecoratorBase.js");
let react = require("react");
react = require_runtime.__toESM(react);
let prop_types = require("prop-types");
prop_types = require_runtime.__toESM(prop_types);
//#region src/components/Decorator/Decorator.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.
*/
const componentName = "Decorator";
/**
* The Decorator groups a key/value pair as a single element. This component is not interactive.
*/
let Decorator = react.default.forwardRef((props, ref) => {
	const validProps = require_props_helper.prepareProps(props, [
		"disabled",
		"kind",
		"onClick",
		"onClickLabel",
		"onClickValue",
		"onContextMenu",
		"onContextMenuLabel",
		"onContextMenuValue"
	]);
	return /* @__PURE__ */ react.default.createElement(require_DecoratorBase.DecoratorBase, {
		ref,
		...validProps,
		kind: "default",
		...require_devtools.getDevtoolsProps(componentName)
	});
});
Decorator = require_settings.pkg.checkComponentEnabled(Decorator, componentName);
Decorator.displayName = componentName;
Decorator.propTypes = {
	/**
	* Provide an optional class to be applied to the containing node.
	*/
	className: prop_types.default.string,
	/**
	* Do not show the icon, regardless of score.
	*/
	hideIcon: prop_types.default.bool,
	/**
	* The label for the data.
	*/
	label: prop_types.default.string,
	/**
	* Used in conjunction with `scoreThresholds`, determines the color, shape, and type of magnitude of the icon.
	*
	* If you don't want to show the icon at all, set `hideIcon={true}`.
	*/
	score: prop_types.default.number,
	/**
	* Used in conjunction with `score`, determines the color, shape, and type of magnitude of the icon.
	*
	* An array of 4 numbers determines the range of thresholds.
	*
	* Example using `[0, 4, 7, 10]`:
	* <br/>- `<= 0` "Benign"
	* <br/>- `1-3` "Low"
	* <br/>- `4-6` "Medium"
	* <br/>- `7-9` "High"
	* <br/>- `>= 10` "Critical"
	* <br/>- `NaN` "Unknown"
	*/
	scoreThresholds: prop_types.default.arrayOf(prop_types.default.number),
	/**
	* Optional callback function for building a more detailed descriptive text.
	* Returns `score`, `scoreThresholds`, `magnitude`.
	*
	* Typical description is in the form of
	* '"(magnitude)" magnitude: score (score) out of (last element of scoreThresholds array)'.
	*
	* E.g. `"Medium" magnitude: score 5 out of 10`.
	*
	* If not defined, the title will default to the `label` prop.
	*/
	setLabelTitle: prop_types.default.func,
	/**
	* Styled smaller to better fit inline with text.
	*/
	small: prop_types.default.bool,
	/**
	* Override the default theme of the component.
	* Useful if you want "invert" the component's theme.
	*/
	theme: prop_types.default.oneOf(["light", "dark"]),
	/**
	* If not defined, it will behave as `display:inline-block`.
	*/
	truncateValue: prop_types.default.oneOfType([prop_types.default.oneOf(["end", "start"]), prop_types.default.shape({
		maxLength: prop_types.default.number,
		front: prop_types.default.number,
		back: prop_types.default.number
	})]),
	/**
	* The value of the data.
	*/
	value: prop_types.default.string.isRequired,
	/**
	* Overrides the default title for the Decorator's value.
	*/
	valueTitle: prop_types.default.string
};
//#endregion
Object.defineProperty(exports, "Decorator", {
	enumerable: true,
	get: function() {
		return Decorator;
	}
});
