"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
;/* empty css                                                                                                                                                                                                 */
const index_esm = require("../../../node_modules/.pnpm/mantine-react-table@2.0.0-beta.7_@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@_6pmziqsvipqgt5gv2plqw5hct4/node_modules/mantine-react-table/dist/index.esm.cjs");
;/* empty css                                                                                                                                                                                           */
;/* empty css                                                                                                                                                                                            */
;/* empty css                                                                                                                                                                                                    */
;/* empty css                                                                                                                                                                                               */
;/* empty css                                                                                                                                                                                               */
const TablePagination = require("../TablePagination.cjs");
const helpers = require("./helpers.cjs");
const Box = require("../../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/Box/Box.cjs");
const isTableInstanceProp = (props) => props.table !== void 0;
const ProTable = (props) => {
  const isInstance = isTableInstanceProp(props);
  let table = helpers.useProTable(isInstance ? { columns: [], data: [] } : props);
  if (isInstance) {
    table = props.table;
  }
  return /* @__PURE__ */ jsxRuntime.jsxs(Box.Box, { ...props.wrapperProps || table.wrapperProps, children: [
    /* @__PURE__ */ jsxRuntime.jsx(index_esm.MantineReactTable, { table }),
    table.options.enablePagination && /* @__PURE__ */ jsxRuntime.jsx(TablePagination.ProTablePagination, { table, ...table.pagination || props.pagination })
  ] });
};
exports.ProTable = ProTable;
