/**
 * 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.
 */

import { __toESM } from "../../_virtual/_rolldown/runtime.js";
import { require_classnames } from "../../node_modules/classnames/index.js";
import { pkg } from "../../settings.js";
import { getDevtoolsProps } from "../../global/js/utils/devtools.js";
import { useCoachmark } from "./utils/context.js";
import React from "react";
import PropTypes from "prop-types";
import { Button } from "@carbon/react";
import { Close, Idea } from "@carbon/react/icons";

//#region src/components/Coachmark/CoachmarkTagline.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__ */ __toESM(require_classnames());
const blockClass = `${pkg.prefix}--coachmark-tagline`;
const componentName = "CoachmarkTagline";
const defaults = {
	onClose: () => {},
	theme: "light",
	closeIconDescription: "Close"
};
/**
* DO NOT USE. This component is for the exclusive use
* of other Onboarding components.
* @deprecated This component is deprecated.
*/
const CoachmarkTagline = React.forwardRef(({ closeIconDescription = defaults.closeIconDescription, onClose = defaults.onClose, theme = defaults.theme, title, ...rest }, ref) => {
	const coachmark = useCoachmark();
	const contextCloseIconDescription = useCoachmark()?.closeIconDescription;
	const closeIconDesc = closeIconDescription ?? contextCloseIconDescription;
	return /* @__PURE__ */ React.createElement("div", {
		...rest,
		className: (0, import_classnames.default)(blockClass, `${blockClass}__${theme}`, coachmark?.isOpen && `${blockClass}--is-open`),
		ref,
		...getDevtoolsProps(componentName)
	}, /* @__PURE__ */ React.createElement("button", {
		className: `${blockClass}__cta`,
		type: "button",
		...coachmark?.buttonProps
	}, /* @__PURE__ */ React.createElement("div", { className: `${blockClass}__idea` }, /* @__PURE__ */ React.createElement(Idea, { size: 16 })), /* @__PURE__ */ React.createElement("div", null, title)), /* @__PURE__ */ React.createElement("div", { className: `${blockClass}--close-btn-container` }, /* @__PURE__ */ React.createElement(Button, {
		kind: "ghost",
		size: "sm",
		renderIcon: Close,
		iconDescription: closeIconDesc,
		hasIconOnly: true,
		className: `${blockClass}--close-btn`,
		onClick: onClose
	})));
});
/**@ts-ignore*/
CoachmarkTagline.deprecated = {
	level: "warn",
	details: `${componentName} is deprecated.`
};
CoachmarkTagline.displayName = componentName;
CoachmarkTagline.propTypes = {
	closeIconDescription: PropTypes.string,
	onClose: PropTypes.func,
	theme: PropTypes.oneOf(["light", "dark"]),
	title: PropTypes.string.isRequired
};

//#endregion
export { CoachmarkTagline };