/**
 * 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/Checklist/ChecklistIcon.jsx
/**
* Copyright IBM Corp. 2023, 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.
*/
/**
* TODO: Breakdown titles, icons, clickable items into sub-components
* See
*   ModifiedTabs (ModifiedTabLabelNew, ModifiedTabLabelWithClose)
*   PageHeader (PageHeaderTitle, PageHeaderUtils)
*/
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
const blockClass = `${require_settings.pkg.prefix}--checklist__icon`;
const componentName = "ChecklistIcon";
const defaults = { theme: "light" };
/**
* TODO: A description of the component.
*/
let ChecklistIcon = react.default.forwardRef(
	/**
	* @param {{className?: string, kind?: import('./Checklist.types').Kind, theme?: import('./Checklist.types').Theme}} props type description
	*/
	({ className, kind, theme = defaults.theme, ...rest }, ref) => {
		let Icon;
		switch (kind) {
			case "error":
				Icon = _carbon_react_icons.Warning;
				break;
			case "indeterminate":
				Icon = _carbon_react_icons.Incomplete;
				break;
			case "checked":
				Icon = _carbon_react_icons.CheckmarkOutline;
				break;
			default:
				Icon = _carbon_react_icons.CircleDash;
				break;
		}
		return /* @__PURE__ */ react.default.createElement("span", {
			...rest,
			className: (0, import_classnames.default)(blockClass, className, `${blockClass}--${kind}`, `${blockClass}__${theme}`),
			ref,
			...require_devtools.getDevtoolsProps(componentName)
		}, /* @__PURE__ */ react.default.createElement(Icon, { size: 16 }));
	}
);
ChecklistIcon.propTypes = {
	/**
	* Provide an optional class to be applied to the containing node.
	*/
	className: prop_types.default.string,
	/**
	* The icon to be displayed.
	*/
	kind: prop_types.default.oneOf([
		"unchecked",
		"indeterminate",
		"checked",
		"disabled",
		"error"
	]),
	/**
	* Determines the theme of the component.
	*/
	theme: prop_types.default.oneOf(["light", "dark"])
};
//#endregion
exports.ChecklistIcon = ChecklistIcon;
