"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.TableBodyCellLoader = TableBodyCellLoader;
var _react = _interopRequireDefault(require("react"));
var _skeleton = require("../../skeleton");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function TableBodyCellLoader({
  cell
}) {
  const {
    render,
    ...skeletonProps
  } = cell.column.columnDef?.meta?.loader || {};
  if (render) {
    return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
      children: render()
    });
  }
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_skeleton.Skeleton, {
    testId: "react-table-skeleton-loading",
    type: _skeleton.SKELETON_TYPES.TEXT,
    textType: "body",
    ...skeletonProps
  });
}