/**
 * 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');
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 = require("@carbon/react");

//#region src/components/ActionBar/ActionBarItem.tsx
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
const componentName = "ActionBarItem";
const blockClass = `${require_settings.pkg.prefix}--action-bar-item`;
/**
* The ActionBarItem is used in the page header to populate the action bar
*/
const ActionBarItem = react.default.forwardRef(({ label, className, renderIcon, ...rest }, ref) => {
	const Icon = renderIcon;
	return /* @__PURE__ */ react.default.createElement(_carbon_react.IconButton, {
		...rest,
		ref,
		className: (0, import_classnames.default)(blockClass, className),
		kind: "ghost",
		size: "md",
		align: "bottom-end",
		type: "button",
		label
	}, Icon ? /* @__PURE__ */ react.default.createElement(Icon, null) : null);
});
const reservedProps = [
	"kind",
	"size",
	"align",
	"type"
];
const propTypes = { ..._carbon_react.IconButton.propTypes };
reservedProps.forEach((prop) => {
	delete propTypes[prop];
});
ActionBarItem.displayName = componentName;
ActionBarItem.propTypes = {
	...propTypes,
	className: prop_types.default.string,
	label: prop_types.default.string,
	onClick: prop_types.default.func,
	renderIcon: prop_types.default.oneOfType([prop_types.default.func, prop_types.default.object]),
	tabIndex: prop_types.default.number
};

//#endregion
exports.ActionBarItem = ActionBarItem;