/**
 * 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 DatagridEmptyBody from "./DatagridEmptyBody.js";
import DatagridVirtualBody from "./DatagridVirtualBody.js";
import DatagridSimpleBody from "./DatagridSimpleBody.js";
import DatagridRefBody from "./DatagridRefBody.js";
import React from "react";
//#region src/components/Datagrid/Datagrid/DatagridBody.tsx
/**
* Copyright IBM Corp. 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.
*/
const DatagridBody = (datagridState) => {
	const { isFetching, rows = [], withVirtualScroll, withStickyColumn } = datagridState;
	if (!isFetching && rows.length === 0) return /* @__PURE__ */ React.createElement(DatagridEmptyBody, datagridState);
	if (withVirtualScroll) return /* @__PURE__ */ React.createElement(DatagridVirtualBody, datagridState);
	if (withStickyColumn) return /* @__PURE__ */ React.createElement(DatagridRefBody, datagridState);
	return /* @__PURE__ */ React.createElement(DatagridSimpleBody, datagridState);
};
//#endregion
export { DatagridBody as default };
