/**
 * 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 { TruncatedList } from "../../TruncatedList/TruncatedList.js";
import { FilterPanelLabel } from "../FilterPanelLabel/FilterPanelLabel.js";
import React, { Children } from "react";
import PropTypes from "prop-types";
import { AccordionItem, ListItem } from "@carbon/react";
//#region src/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.jsx
/**
* Copyright IBM Corp. 2024, 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}--filter-panel-accordion-item`;
const componentName = "FilterPanelAccordionItem";
const defaults = {
	accordionItemProps: {},
	truncatedListProps: {}
};
/**
* A container with a label and optional count.
* @deprecated This component is deprecated
*/
let FilterPanelAccordionItem = React.forwardRef(({ accordionItemProps = defaults.accordionItemProps, truncatedListProps = defaults.truncatedListProps, children, className, count, labelText, title, ...rest }, ref) => {
	return /* @__PURE__ */ React.createElement(AccordionItem, {
		...accordionItemProps,
		className: (0, import_classnames.default)(blockClass, className),
		ref,
		title: /* @__PURE__ */ React.createElement(FilterPanelLabel, {
			...rest,
			count,
			labelText,
			title
		}),
		...getDevtoolsProps(componentName)
	}, /* @__PURE__ */ React.createElement(TruncatedList, {
		...truncatedListProps,
		className: `${blockClass}__list`
	}, Children.map(children, (child) => /* @__PURE__ */ React.createElement(ListItem, {
		className: `${blockClass}__list-item`,
		key: child.key
	}, child))));
});
FilterPanelAccordionItem.deprecated = {
	level: "warn",
	details: `This component is deprecated`
};
FilterPanelAccordionItem = pkg.checkComponentEnabled(FilterPanelAccordionItem, componentName);
FilterPanelAccordionItem.displayName = componentName;
FilterPanelAccordionItem.propTypes = {
	/**
	* Props specific to the internal `AccordionItem` component.
	*/
	accordionItemProps: PropTypes.shape({}),
	/**
	* Provide the contents of the FilterPanelAccordionItem.
	*/
	children: PropTypes.node.isRequired,
	/**
	* Optional class to be applied to the containing node.
	*/
	className: PropTypes.string,
	/**
	* Number to be displayed with the label.
	*/
	count: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
	/**
	* The label for the component.
	*/
	labelText: PropTypes.node.isRequired,
	/**
	* Optional title attribute for the label.
	*/
	title: PropTypes.string,
	/**
	* Props specific to the internal `TruncatedList` component.
	*/
	truncatedListProps: PropTypes.shape({})
};
//#endregion
export { FilterPanelAccordionItem };
