/**
 * 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_settings = require('../../../settings.js');
const require_EmptyState = require('../../EmptyStates/EmptyState.js');
const require_ErrorEmptyState = require('../../EmptyStates/ErrorEmptyState/ErrorEmptyState.js');
const require_NoDataEmptyState = require('../../EmptyStates/NoDataEmptyState/NoDataEmptyState.js');
const require_NotFoundEmptyState = require('../../EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js');
let react = require("react");
react = require_runtime.__toESM(react);
let _carbon_react = require("@carbon/react");

//#region src/components/Datagrid/Datagrid/DatagridEmptyBody.tsx
/**
* Copyright IBM Corp. 2020, 2023
*
* 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 blockClass = `${require_settings.pkg.prefix}--datagrid`;
const DatagridEmptyBody = (datagridState) => {
	const { getTableBodyProps, headers, emptyStateTitle, emptyStateDescription, emptyStateSize, emptyStateType = "noData", illustrationTheme, emptyStateAction, emptyStateLink } = datagridState;
	const emptyStateProps = {
		illustrationTheme,
		size: emptyStateSize,
		title: emptyStateTitle,
		subtitle: emptyStateDescription,
		action: emptyStateAction,
		link: emptyStateLink
	};
	const validEmptyStates = [
		"error",
		"noData",
		"notFound"
	];
	return /* @__PURE__ */ react.default.createElement(_carbon_react.TableBody, {
		...getTableBodyProps({ role: void 0 }),
		"aria-live": "off",
		className: `${blockClass}__empty-state-body`
	}, /* @__PURE__ */ react.default.createElement(_carbon_react.TableRow, null, /* @__PURE__ */ react.default.createElement(_carbon_react.TableCell, {
		colSpan: headers?.length,
		className: `${blockClass}__empty-state-cell`
	}, validEmptyStates.includes(emptyStateType) ? /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, emptyStateType === "error" && /* @__PURE__ */ react.default.createElement(require_ErrorEmptyState.ErrorEmptyState, emptyStateProps), emptyStateType === "noData" && /* @__PURE__ */ react.default.createElement(require_NoDataEmptyState.NoDataEmptyState, emptyStateProps), emptyStateType === "notFound" && /* @__PURE__ */ react.default.createElement(require_NotFoundEmptyState.NotFoundEmptyState, emptyStateProps)) : /* @__PURE__ */ react.default.createElement(require_EmptyState.EmptyState, emptyStateProps))));
};

//#endregion
exports.default = DatagridEmptyBody;