"use client";
import * as o from "react";
import { createTable as u } from "../../../table-core/build/lib/index.js";
import { ColumnFaceting as C, ColumnFiltering as S, ColumnGrouping as w, ColumnOrdering as b, ColumnPinning as y, ColumnSizing as F, ColumnVisibility as h, GlobalFaceting as x, GlobalFiltering as O, Headers as M, RowExpanding as P, RowPagination as v, RowPinning as E, RowSelection as G, RowSorting as $, _getVisibleLeafColumns as A, aggregationFns as V, buildHeaderGroups as j, createCell as k, createColumn as z, createRow as H, defaultColumnSizing as N, expandRows as T, filterFns as U, flattenBy as _, functionalUpdate as B, getCoreRowModel as L, getFilteredRowModel as q, getMemoOptions as D, getPaginationRowModel as I, getSortedRowModel as J, isFunction as K, isNumberArray as Q, isRowSelected as W, isSubRowSelected as X, makeStateUpdater as Y, memo as Z, orderColumns as ee, passiveEventSupported as te, reSplitAlphaNumeric as ne, selectRowsFn as oe, shouldAutoRemoveFilter as re, sortingFns as ie } from "../../../table-core/build/lib/index.js";
/**
   * react-table
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   */
function d(e, t) {
  return e ? s(e) ? /* @__PURE__ */ o.createElement(e, t) : e : null;
}
function s(e) {
  return c(e) || typeof e == "function" || g(e);
}
function c(e) {
  return typeof e == "function" && (() => {
    const t = Object.getPrototypeOf(e);
    return t.prototype && t.prototype.isReactComponent;
  })();
}
function g(e) {
  return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
}
function m(e) {
  const t = {
    state: {},
    // Dummy state
    onStateChange: () => {
    },
    // noop
    renderFallbackValue: null,
    ...e
  }, [n] = o.useState(() => ({
    current: u(t)
  })), [i, a] = o.useState(() => n.current.initialState);
  return n.current.setOptions((l) => ({
    ...l,
    ...e,
    state: {
      ...i,
      ...e.state
    },
    // Similarly, we'll maintain both our internal state and any user-provided
    // state.
    onStateChange: (r) => {
      a(r), e.onStateChange == null || e.onStateChange(r);
    }
  })), n.current;
}
export {
  C as ColumnFaceting,
  S as ColumnFiltering,
  w as ColumnGrouping,
  b as ColumnOrdering,
  y as ColumnPinning,
  F as ColumnSizing,
  h as ColumnVisibility,
  x as GlobalFaceting,
  O as GlobalFiltering,
  M as Headers,
  P as RowExpanding,
  v as RowPagination,
  E as RowPinning,
  G as RowSelection,
  $ as RowSorting,
  A as _getVisibleLeafColumns,
  V as aggregationFns,
  j as buildHeaderGroups,
  k as createCell,
  z as createColumn,
  H as createRow,
  u as createTable,
  N as defaultColumnSizing,
  T as expandRows,
  U as filterFns,
  _ as flattenBy,
  d as flexRender,
  B as functionalUpdate,
  L as getCoreRowModel,
  q as getFilteredRowModel,
  D as getMemoOptions,
  I as getPaginationRowModel,
  J as getSortedRowModel,
  K as isFunction,
  Q as isNumberArray,
  W as isRowSelected,
  X as isSubRowSelected,
  Y as makeStateUpdater,
  Z as memo,
  ee as orderColumns,
  te as passiveEventSupported,
  ne as reSplitAlphaNumeric,
  oe as selectRowsFn,
  re as shouldAutoRemoveFilter,
  ie as sortingFns,
  m as useReactTable
};
