/**
 * 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');
const require_context = require('./utils/context.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");
let _carbon_react_icons = require("@carbon/react/icons");

//#region src/components/Coachmark/CoachmarkHeader.tsx
/**
* Copyright IBM Corp. 2023, 2025
*
* 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}--coachmark-header`;
const overlayBlockClass = `${require_settings.pkg.prefix}--coachmark-overlay`;
const componentName = "CoachmarkHeader";
const defaults = {
	onClose: () => {},
	showCloseButton: true,
	theme: "light"
};
/**
* DO NOT USE. This component is for the exclusive use
* of other Onboarding components.
* @deprecated This component is deprecated.
*/
const CoachmarkHeader = react.default.forwardRef(({ onClose = defaults.onClose, showCloseButton = defaults.showCloseButton, theme = defaults.theme, ...rest }, ref) => {
	const closeIconDescription = require_context.useCoachmark()?.closeIconDescription;
	return /* @__PURE__ */ react.default.createElement("header", {
		...rest,
		className: (0, import_classnames.default)(blockClass, `${blockClass}__${theme}`),
		ref,
		...require_devtools.getDevtoolsProps(componentName)
	}, showCloseButton && /* @__PURE__ */ react.default.createElement("div", { className: `${overlayBlockClass}--close-btn-container` }, /* @__PURE__ */ react.default.createElement(_carbon_react.Button, {
		kind: "ghost",
		size: "sm",
		renderIcon: _carbon_react_icons.Close,
		iconDescription: closeIconDescription,
		hasIconOnly: true,
		className: `${overlayBlockClass}--close-btn`,
		onClick: onClose
	})));
});
/**@ts-ignore*/
CoachmarkHeader.deprecated = {
	level: "warn",
	details: `${componentName} is deprecated.`
};
CoachmarkHeader.displayName = componentName;
CoachmarkHeader.propTypes = {
	closeIconDescription: prop_types.default.string,
	onClose: prop_types.default.func,
	showCloseButton: prop_types.default.bool,
	theme: prop_types.default.oneOf(["light", "dark"])
};

//#endregion
exports.CoachmarkHeader = CoachmarkHeader;