/**
 * 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 React from "react";
import PropTypes from "prop-types";

//#region src/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.jsx
/**
* Copyright IBM Corp. 2024, 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.
*/
var import_classnames = /* @__PURE__ */ __toESM(require_classnames());
const blockClass = `${pkg.prefix}--filter-panel-label`;
const componentName = "FilterPanelLabel";
/**
* A container with a label and optional count.
*/
let FilterPanelLabel = React.forwardRef(({ className, count, labelText, title, ...rest }, ref) => {
	return /* @__PURE__ */ React.createElement("span", {
		...rest,
		className: (0, import_classnames.default)(blockClass, className),
		ref,
		...getDevtoolsProps(componentName)
	}, /* @__PURE__ */ React.createElement("span", {
		className: `${blockClass}__text`,
		title
	}, labelText), count && /* @__PURE__ */ React.createElement("span", { className: `${blockClass}__count` }, count), " ");
});
FilterPanelLabel = pkg.checkComponentEnabled(FilterPanelLabel, componentName);
FilterPanelLabel.displayName = componentName;
FilterPanelLabel.propTypes = {
	className: PropTypes.string,
	count: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
	labelText: PropTypes.node.isRequired,
	title: PropTypes.string
};

//#endregion
export { FilterPanelLabel };