/**
 * 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_context = require("./context.js");
const require_AddSelectBody = require("./AddSelectBody.js");
const require_AddSelectContent = require("./AddSelectContent.js");
const require_AddSelectColumn = require("./AddSelectColumn.js");
const require_AddSelectRow = require("./AddSelectRow.js");
const require_AddSelectSelectionSummary = require("./AddSelectSelectionSummary.js");
const require_AddSelectSelectionSummaryItem = require("./AddSelectSelectionSummaryItem.js");
const require_AddSelectItemPanel = require("./AddSelectItemPanel.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/AddSelect/next/AddSelect.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);
/**
* AddSelect - Composable component for adding/selecting items
* @example
* ```jsx
* <AddSelect onItemSelect={handleSelect}>
*   <AddSelect.Body
*     itemsLabel="Items"
*     globalSearchLabel="Search"
*     itemCount={items.length}
*   >
*     <AddSelect.Column multi={true} title="Categories">
*       {items.map(item => (
*         <AddSelect.Row
*           key={item.id}
*           itemId={item.id}
*           title={item.title}
*           value={item.value}
*         />
*       ))}
*     </AddSelect.Column>
*   </AddSelect.Body>
* </AddSelect>
* ```
*/
const AddSelect = (0, react.forwardRef)(({ children, className, onItemSelect, selectedItems, ...rest }, ref) => {
	return /* @__PURE__ */ react.default.createElement(require_context.AddSelectContext.Provider, { value: {
		onItemSelect,
		selectedItems
	} }, /* @__PURE__ */ react.default.createElement("div", {
		className: (0, import_classnames.default)(require_context.blockClass, className),
		ref,
		...rest
	}, children));
});
AddSelect.propTypes = {
	children: prop_types.default.node,
	className: prop_types.default.string,
	/**@ts-ignore */
	onItemSelect: prop_types.default.func,
	/**@ts-ignore */
	selectedItems: prop_types.default.instanceOf(Set)
};
AddSelect.Body = require_AddSelectBody.default;
AddSelect.Content = require_AddSelectContent.default;
AddSelect.Column = require_AddSelectColumn.default;
AddSelect.Row = require_AddSelectRow.default;
AddSelect.SelectionSummary = require_AddSelectSelectionSummary.default;
AddSelect.SelectionSummaryItem = require_AddSelectSelectionSummaryItem.default;
AddSelect.ItemPanel = require_AddSelectItemPanel.default;
AddSelect.displayName = "AddSelect";
//#endregion
exports.AddSelect = AddSelect;
