import React from 'react';
import { Skeleton, SKELETON_TYPES } from '../../skeleton';
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
export function TableBodyCellLoader({
  cell
}) {
  const {
    render,
    ...skeletonProps
  } = cell.column.columnDef?.meta?.loader || {};
  if (render) {
    return /*#__PURE__*/_jsx(_Fragment, {
      children: render()
    });
  }
  return /*#__PURE__*/_jsx(Skeleton, {
    testId: "react-table-skeleton-loading",
    type: SKELETON_TYPES.TEXT,
    textType: "body",
    ...skeletonProps
  });
}