/**
 * 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');
let react = require("react");
react = require_runtime.__toESM(react);
let prop_types = require("prop-types");
prop_types = require_runtime.__toESM(prop_types);

//#region src/components/DelimitedList/DelimitedList.tsx
/**
* 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__ */ require_runtime.__toESM(require_index.default);
const blockClass = `${require_settings.pkg.prefix}--delimited-list`;
const componentName = "DelimitedList";
const defaults = {
	delimiter: ", ",
	items: [],
	truncate: true
};
/**
* `DelimitedList` converts an array of items into a single line of
* comma-separated values.
* @deprecated This component is deprecated and will be removed in the next major version.
*/
const DelimitedList = react.default.forwardRef(({ className, delimiter = defaults.delimiter, items = defaults.items, truncate = defaults.truncate, ...rest }, ref) => {
	return /* @__PURE__ */ react.default.createElement("div", {
		...rest,
		className: (0, import_classnames.default)(blockClass, className, [truncate && `${blockClass}-truncate`]),
		ref,
		...require_devtools.getDevtoolsProps(componentName)
	}, items.length > 0 ? items.join(delimiter) : "–");
});
/**@ts-ignore*/
DelimitedList.deprecated = {
	level: "warn",
	details: `${componentName} is deprecated and will be removed in the next major version`
};
DelimitedList.displayName = componentName;
DelimitedList.propTypes = {
	className: prop_types.default.string,
	delimiter: prop_types.default.string,
	items: prop_types.default.arrayOf(prop_types.default.any),
	truncate: prop_types.default.bool
};

//#endregion
exports.DelimitedList = DelimitedList;