/**
 * 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_context = require('./context.js');
let react = require("react");
react = require_runtime.__toESM(react);
let _carbon_react = require("@carbon/react");

//#region src/components/PageHeader/next/PageHeaderTitleBreadcrumb.tsx
/**
* Copyright IBM Corp. 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.
*/
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
const PageHeaderTitleBreadcrumb = (0, react.forwardRef)(({ className, children, ...other }, ref) => {
	const { observerState, refs } = require_context.usePageHeader();
	const titleClipped = observerState.titleClipped;
	const hasContentElement = refs?.contentRef?.current;
	const shouldShow = !hasContentElement || titleClipped && !!refs?.titleRef;
	return /* @__PURE__ */ react.default.createElement(_carbon_react.BreadcrumbItem, {
		ref,
		isCurrentPage: true,
		...other,
		className: (0, import_classnames.default)(className, `${require_settings.pkg.prefix}--page-header-title-breadcrumb`, {
			[`${require_settings.pkg.prefix}--page-header-title-breadcrumb-show`]: shouldShow,
			[`${require_settings.pkg.prefix}--page-header-title-breadcrumb-show__with-content-element`]: hasContentElement,
			[`${require_settings.pkg.prefix}--page-header-title-breadcrumb-show__without-content-element`]: !hasContentElement
		})
	}, children);
});
PageHeaderTitleBreadcrumb.displayName = "PageHeaderTitleBreadcrumb";

//#endregion
exports.PageHeaderTitleBreadcrumb = PageHeaderTitleBreadcrumb;