/**
 * ldesign v0.4.2
 * (c) 2023 ldesign
 * @license MIT
 */

import { _ as _defineProperty } from '../_chunks/dep-eb20e23f.mjs';
import { defineComponent, toRefs, ref, computed, onMounted, createVNode, h, mergeProps } from 'vue';
import { g as get_1 } from '../_chunks/dep-4c3e8dd5.mjs';
import { o as omit_1 } from '../_chunks/dep-b2af48ba.mjs';
import { useTNodeJSX } from '../hooks/tnode.mjs';
import baseTableProps from './base-table-props.mjs';
import primaryTableProps from './primary-table-props.mjs';
import _BaseTable from './base-table.mjs';
export { BASE_TABLE_ALL_EVENTS } from './base-table.mjs';
import useColumnController from './hooks/useColumnController.mjs';
import useRowExpand from './hooks/useRowExpand.mjs';
import useTableHeader, { renderTitle } from './hooks/useTableHeader.mjs';
import useRowSelect from './hooks/useRowSelect.mjs';
import useSorter from './hooks/useSorter.mjs';
import useFilter from './hooks/useFilter.mjs';
import useDragSort from './hooks/useDragSort.mjs';
import useAsyncLoading from './hooks/useAsyncLoading.mjs';
import EditableCell from './editable-cell.mjs';
import useClassName from './hooks/useClassName.mjs';
import useRowEdit from './hooks/useEditableRow.mjs';
import useStyle from './hooks/useStyle.mjs';
import '../_chunks/dep-b4041200.mjs';
import '../_chunks/dep-a0b4a044.mjs';
import '../_chunks/dep-7acc11cb.mjs';
import '../_chunks/dep-e3b14d70.mjs';
import '../_chunks/dep-66d6733b.mjs';
import '../_chunks/dep-be27d184.mjs';
import '../_chunks/dep-c959a6fb.mjs';
import '../_chunks/dep-c31e1d9e.mjs';
import '../_chunks/dep-0bfbf721.mjs';
import '../_chunks/dep-39cc276d.mjs';
import '../_chunks/dep-6b22dd27.mjs';
import '../_chunks/dep-0f0c89ff.mjs';
import '../_chunks/dep-8f777748.mjs';
import '../_chunks/dep-ae357f26.mjs';
import '../_chunks/dep-37ba476d.mjs';
import '../_chunks/dep-bf74f1c2.mjs';
import '../_chunks/dep-79821ff2.mjs';
import '../_chunks/dep-352691c2.mjs';
import '../_chunks/dep-2cfd5b3a.mjs';
import '../_chunks/dep-05fa17c9.mjs';
import '../_chunks/dep-a9c8a5d5.mjs';
import '../_chunks/dep-10085c61.mjs';
import '../_chunks/dep-1b058de3.mjs';
import '../_chunks/dep-c852a61a.mjs';
import '../_chunks/dep-92e7085e.mjs';
import '../_chunks/dep-44f056cd.mjs';
import '../_chunks/dep-23a0f453.mjs';
import '../_chunks/dep-59c8420d.mjs';
import '../_chunks/dep-ba3c0b2e.mjs';
import '../_chunks/dep-774ac2d0.mjs';
import '../_chunks/dep-3afa94cf.mjs';
import '../_chunks/dep-f6649a46.mjs';
import '../_chunks/dep-1fe0ad42.mjs';
import '../_chunks/dep-d54f2690.mjs';
import '../_chunks/dep-74848b92.mjs';
import '../_chunks/dep-c4e1a112.mjs';
import '../utils/render-tnode.mjs';
import '../_chunks/dep-bd03960e.mjs';
import '../_chunks/dep-1cf2b129.mjs';
import '../_chunks/dep-e9bfe96d.mjs';
import '../_chunks/dep-ea5448a5.mjs';
import '../hooks/useVirtualScrollNew.mjs';
import '../_chunks/dep-e091cfd9.mjs';
import '../_chunks/dep-cfcedf47.mjs';
import '../_chunks/dep-55846619.mjs';
import '../hooks/useResizeObserver.mjs';
import '../loading/index.mjs';
import '../utils/withInstall.mjs';
import '../loading/directive.mjs';
import '../loading/plugin.mjs';
import '../utils/dom.mjs';
import '../utils/easing.mjs';
import '../hooks/useConfig.mjs';
import '../config-provider/useConfig.mjs';
import '../_chunks/dep-44417261.mjs';
import '../_chunks/dep-99920870.mjs';
import '../_chunks/dep-c7e9ce16.mjs';
import '../_chunks/dep-ee57d235.mjs';
import '../_common/js/global-config/default-config.mjs';
import '../_common/js/global-config/locale/zh_CN.mjs';
import '../_chunks/dep-6b4aa943.mjs';
import '../_chunks/dep-d52291a9.mjs';
import '../config-provider/type.mjs';
import '../loading/loading.mjs';
import '../hooks/useTeleport.mjs';
import '../loading/props.mjs';
import '../loading/icon/gradient.mjs';
import '../_common/js/loading/circle-adapter.mjs';
import '../_common/js/utils/set-style.mjs';
import '../_common/js/utils/helper.mjs';
import '../_chunks/dep-b6a73f93.mjs';
import '../_chunks/dep-6f89b77e.mjs';
import '../_chunks/dep-30451c48.mjs';
import '../_chunks/dep-6eea369f.mjs';
import '../loading/style/css.mjs';
import '../loading/type.mjs';
import '../affix/index.mjs';
import '../affix/affix.mjs';
import '../_chunks/dep-beaa677e.mjs';
import '../affix/props.mjs';
import '../affix/style/css.mjs';
import '../affix/type.mjs';
import './hooks/useColumnResize.mjs';
import './hooks/useFixed.mjs';
import '../_chunks/dep-96bb54d5.mjs';
import '../_chunks/dep-6205fc47.mjs';
import '../_common/js/log/index.mjs';
import '../_common/js/log/log.mjs';
import '../_common/js/utils/getScrollbarWidth.mjs';
import './hooks/usePagination.mjs';
import '../pagination/index.mjs';
import '../pagination/pagination.mjs';
import '@ldesign/icons-vue-next';
import '../hooks/useGlobalIcon.mjs';
import '../input-number/index.mjs';
import '../input-number/input-number.mjs';
import '../button/index.mjs';
import '../button/button.mjs';
import '../hooks/useRipple.mjs';
import '../utils/set-style.mjs';
import '../hooks/useKeepAnimation.mjs';
import '../form/hooks.mjs';
import '../button/props.mjs';
import '../button/style/css.mjs';
import '../button/type.mjs';
import '../input/index.mjs';
import '../input/input.mjs';
import '../input/props.mjs';
import '../input/useInput.mjs';
import '../form/const.mjs';
import '../hooks/index.mjs';
import '../hooks/icon.mjs';
import '../hooks/slot.mjs';
import '../hooks/useCommonClassName.mjs';
import '../hooks/useDefaultValue.mjs';
import '../hooks/useDestroyOnClose.mjs';
import '../hooks/useVirtualScroll.mjs';
import '../hooks/useVModel.mjs';
import '../input/useLengthLimit.mjs';
import '../input/useInputEventHandler.mjs';
import '../input/useInputWidth.mjs';
import '../input/input-group.mjs';
import '../input/input-group-props.mjs';
import '../input/style/css.mjs';
import '../input/type.mjs';
import '../input-number/props.mjs';
import '../input-number/useInputNumber.mjs';
import '../_common/js/input-number/number.mjs';
import '../_chunks/dep-51aacdc9.mjs';
import '../_common/js/input-number/large-number.mjs';
import '../input-number/style/css.mjs';
import '../input-number/type.mjs';
import '../select/index.mjs';
import '../select/select.mjs';
import '../_chunks/dep-0492e83e.mjs';
import '../_chunks/dep-5d966cee.mjs';
import '../common-components/fake-arrow.mjs';
import '../select-input/index.mjs';
import '../select-input/select-input.mjs';
import '../popup/index.mjs';
import '../popup/popup.mjs';
import '@popperjs/core';
import '../popup/container.mjs';
import '../popup/props.mjs';
import '../popup/style/css.mjs';
import '../popup/type.mjs';
import '../select-input/props.mjs';
import '../select-input/useSingle.mjs';
import '../select-input/useMultiple.mjs';
import '../tag-input/index.mjs';
import '../tag-input/tag-input.mjs';
import '../tag-input/props.mjs';
import '../tag-input/hooks/useTagScroll.mjs';
import '../tag-input/useTagList.mjs';
import '../tag/index.mjs';
import '../tag/tag.mjs';
import '../tag/props.mjs';
import '../tag/check-tag.mjs';
import '../tag/check-tag-props.mjs';
import '../tag/style/css.mjs';
import '../tag/type.mjs';
import '../tag-input/hooks/useHover.mjs';
import '../tag-input/hooks/useDragSorter.mjs';
import '../tag-input/style/css.mjs';
import '../tag-input/type.mjs';
import '../select-input/useOverlayInnerStyle.mjs';
import '../select-input/style/css.mjs';
import '../select-input/type.mjs';
import '../select/props.mjs';
import '../select/select-panel.mjs';
import '../select/option.mjs';
import '../checkbox/index.mjs';
import '../checkbox/checkbox.mjs';
import '../checkbox/props.mjs';
import '../checkbox/constants.mjs';
import '../checkbox/group.mjs';
import '../checkbox/checkbox-group-props.mjs';
import '../checkbox/style/css.mjs';
import '../checkbox/type.mjs';
import '../select/option-props.mjs';
import '../select/helper.mjs';
import '../select/optionGroup.mjs';
import '../select/option-group-props.mjs';
import '../select/hooks/usePanelVirtualScroll.mjs';
import '../select/hooks/useSelectOptions.mjs';
import '../select/style/css.mjs';
import '../select/type.mjs';
import '../input-adornment/index.mjs';
import '../input-adornment/input-adornment.mjs';
import '../input-adornment/props.mjs';
import '../input-adornment/style/css.mjs';
import '../input-adornment/type.mjs';
import '../pagination/props.mjs';
import '../pagination/usePaginationClasses.mjs';
import '../pagination/useMoreAction.mjs';
import '../pagination/pagination-mini.mjs';
import '../pagination/pagination-mini-props.mjs';
import '../pagination/style/css.mjs';
import '../pagination/type.mjs';
import './hooks/useAffix.mjs';
import './tbody.mjs';
import './tr.mjs';
import './utils.mjs';
import './ellipsis.mjs';
import '../tooltip/index.mjs';
import '../tooltip/tooltip.mjs';
import '../tooltip/util.mjs';
import '../tooltip/props.mjs';
import '../tooltip/style/css.mjs';
import '../tooltip/type.mjs';
import './hooks/useLazyLoad.mjs';
import '../_common/js/utils/observe.mjs';
import './hooks/useRowspanAndColspan.mjs';
import './thead.mjs';
import './tfoot.mjs';
import './hooks/useMultiHeader.mjs';
import '../dialog/plugin.mjs';
import '../dialog/dialog.mjs';
import '../dialog/stack.mjs';
import '../dialog/hooks.mjs';
import '../dialog/props.mjs';
import '../_common/js/table/utils.mjs';
import '../radio/index.mjs';
import '../radio/radio.mjs';
import '../utils/helper.mjs';
import '../radio/constants.mjs';
import '../radio/props.mjs';
import '../radio/group.mjs';
import '../watermark/hooks.mjs';
import '../radio/radio-group-props.mjs';
import '../radio/useKeyboard.mjs';
import '../radio/radio-button.mjs';
import '../radio/style/css.mjs';
import '../radio/type.mjs';
import './sorter-button.mjs';
import './filter-controller.mjs';
import 'sortablejs';
import '../_common/js/utils/swapDragArrayElement.mjs';
import '../_chunks/dep-b8611e18.mjs';
import '../form/form-model.mjs';
import '../_chunks/dep-0cfc2d3f.mjs';

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
var OMIT_PROPS = ["hideSortTips", "dragSort", "defaultExpandedRowKeys", "defaultSelectedRowKeys", "columnController", "filterRow", "sortOnRowDraggable", "expandOnRowClick", "multipleSort", "expandIcon", "reserveSelectedRowOnPaginate", "selectOnRowClick", "onChange", "onAsyncLoadingClick", "onColumnChange", "onColumnControllerVisibleChange", "onDataChange", "onDisplayColumnsChange", "onDragSort", "onExpandChange", "onFilterChange", "onSelectChange", "onSortChange"];
var _PrimaryTable = defineComponent({
  name: "TPrimaryTable",
  props: _objectSpread(_objectSpread({}, baseTableProps), primaryTableProps),
  setup: function setup(props, context) {
    var renderTNode = useTNodeJSX();
    var _toRefs = toRefs(props),
      columns = _toRefs.columns,
      columnController = _toRefs.columnController;
    var primaryTableRef = ref(null);
    var _useClassName = useClassName(),
      classPrefix = _useClassName.classPrefix,
      tableDraggableClasses = _useClassName.tableDraggableClasses,
      tableBaseClass = _useClassName.tableBaseClass,
      tableSelectedClasses = _useClassName.tableSelectedClasses,
      tableSortClasses = _useClassName.tableSortClasses;
    var _useStyle = useStyle(props),
      sizeClassNames = _useStyle.sizeClassNames;
    var _useColumnController = useColumnController(props, context),
      tDisplayColumns = _useColumnController.tDisplayColumns,
      renderColumnController = _useColumnController.renderColumnController;
    var _useRowExpand = useRowExpand(props, context),
      showExpandedRow = _useRowExpand.showExpandedRow,
      showExpandIconColumn = _useRowExpand.showExpandIconColumn,
      getExpandColumn = _useRowExpand.getExpandColumn,
      renderExpandedRow = _useRowExpand.renderExpandedRow,
      onInnerExpandRowClick = _useRowExpand.onInnerExpandRowClick;
    var _useSorter = useSorter(props, context),
      renderSortIcon = _useSorter.renderSortIcon;
    var _useRowSelect = useRowSelect(props, tableSelectedClasses),
      selectedRowClassNames = _useRowSelect.selectedRowClassNames,
      currentPaginateData = _useRowSelect.currentPaginateData,
      formatToRowSelectColumn = _useRowSelect.formatToRowSelectColumn,
      setTSelectedRowKeys = _useRowSelect.setTSelectedRowKeys,
      onInnerSelectRowClick = _useRowSelect.onInnerSelectRowClick;
    var _useFilter = useFilter(props, context),
      hasEmptyCondition = _useFilter.hasEmptyCondition,
      isTableOverflowHidden = _useFilter.isTableOverflowHidden,
      renderFilterIcon = _useFilter.renderFilterIcon,
      renderFirstFilterRow = _useFilter.renderFirstFilterRow,
      setFilterPrimaryTableRef = _useFilter.setFilterPrimaryTableRef;
    var _useDragSort = useDragSort(props, context),
      isRowHandlerDraggable = _useDragSort.isRowHandlerDraggable,
      isRowDraggable = _useDragSort.isRowDraggable,
      isColDraggable = _useDragSort.isColDraggable,
      setDragSortPrimaryTableRef = _useDragSort.setDragSortPrimaryTableRef,
      setDragSortColumns = _useDragSort.setDragSortColumns;
    var _useTableHeader = useTableHeader(props),
      renderTitleWidthIcon = _useTableHeader.renderTitleWidthIcon;
    var _useAsyncLoading = useAsyncLoading(props),
      renderAsyncLoading = _useAsyncLoading.renderAsyncLoading;
    var _useEditableRow = useRowEdit(props),
      errorListMap = _useEditableRow.errorListMap,
      editableKeysMap = _useEditableRow.editableKeysMap,
      validateRowData = _useEditableRow.validateRowData,
      validateTableData = _useEditableRow.validateTableData,
      onRuleChange = _useEditableRow.onRuleChange,
      clearValidateData = _useEditableRow.clearValidateData,
      onPrimaryTableCellEditChange = _useEditableRow.onPrimaryTableCellEditChange;
    var primaryTableClasses = computed(function () {
      var _ref;
      return _ref = {}, _defineProperty(_ref, tableDraggableClasses.colDraggable, isColDraggable.value), _defineProperty(_ref, tableDraggableClasses.rowHandlerDraggable, isRowHandlerDraggable.value), _defineProperty(_ref, tableDraggableClasses.rowDraggable, isRowDraggable.value), _defineProperty(_ref, tableBaseClass.overflowVisible, isTableOverflowHidden.value === false), _defineProperty(_ref, tableBaseClass.tableRowEdit, props.editableRowKeys), _ref;
    });
    var tRowClassNames = computed(function () {
      var tClassNames = [props.rowClassName, selectedRowClassNames.value];
      return tClassNames.filter(function (v) {
        return v;
      });
    });
    var tRowAttributes = computed(function () {
      var tAttributes = [props.rowAttributes];
      if (isRowHandlerDraggable.value || isRowDraggable.value) tAttributes.push(function (_ref2) {
        var row = _ref2.row;
        return {
          "data-id": get_1(row, props.rowKey || "id")
        };
      });
      return tAttributes.filter(function (v) {
        return v;
      });
    });
    onMounted(function () {
      setFilterPrimaryTableRef(primaryTableRef.value);
      setDragSortPrimaryTableRef(primaryTableRef.value);
    });
    context.expose({
      validateRowData: validateRowData,
      validateTableData: validateTableData,
      clearValidateData: clearValidateData,
      refreshTable: function refreshTable() {
        primaryTableRef.value.refreshTable();
      },
      scrollToElement: function scrollToElement(data) {
        primaryTableRef.value.virtualConfig.scrollToElement(data);
      },
      scrollColumnIntoView: function scrollColumnIntoView(colKey) {
        primaryTableRef.value.scrollColumnIntoView(colKey);
      },
      baseTableRef: primaryTableRef
    });
    var getColumns = function getColumns(columns2) {
      var arr = [];
      var _loop = function _loop() {
        var _item$children, _tDisplayColumns$valu, _item$edit, _item$children2, _item$children3;
        var item = _objectSpread({}, columns2[i]);
        var isDisplayColumn = ((_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) || ((_tDisplayColumns$valu = tDisplayColumns.value) === null || _tDisplayColumns$valu === void 0 ? void 0 : _tDisplayColumns$valu.includes(item.colKey));
        if (!isDisplayColumn && props.columnController) return "continue";
        item = formatToRowSelectColumn(item);
        var sort = props.sort;
        if (item.sorter && props.showSortColumnBgColor) {
          var sorts = Array.isArray(sort) ? sort : [sort];
          var sortedColumn = sorts.find(function (sort2) {
            return sort2 && sort2.sortBy === item.colKey && sort2.descending !== void 0;
          });
          if (sortedColumn) {
            item.className = Array.isArray(item.className) ? item.className.concat(tableSortClasses.sortColumn) : [item.className, tableSortClasses.sortColumn];
          }
        }
        if (item.sorter || item.filter) {
          var titleContent = renderTitle(context.slots, item, i);
          var _item = item,
            ellipsisTitle = _item.ellipsisTitle;
          item.title = function (h2, p) {
            var _primaryTableRef$valu;
            var sortIcon = item.sorter ? renderSortIcon(p) : null;
            var filterIcon = item.filter ? renderFilterIcon(p) : null;
            var attach = (_primaryTableRef$valu = primaryTableRef.value) === null || _primaryTableRef$valu === void 0 ? void 0 : _primaryTableRef$valu.tableContentRef;
            return renderTitleWidthIcon([titleContent, sortIcon, filterIcon], p.col, p.colIndex, ellipsisTitle, attach, {
              classPrefix: classPrefix,
              ellipsisOverlayClassName: props.size !== "medium" ? sizeClassNames[props.size] : ""
            });
          };
          item.ellipsisTitle = false;
        }
        if ((_item$edit = item.edit) !== null && _item$edit !== void 0 && _item$edit.component) {
          var oldCell = item.cell;
          item.cell = function (h2, p) {
            var cellProps = _objectSpread(_objectSpread({}, p), {}, {
              oldCell: oldCell,
              tableBaseClass: tableBaseClass,
              cellEmptyContent: props.cellEmptyContent,
              onChange: props.onRowEdit,
              onValidate: props.onRowValidate,
              onRuleChange: onRuleChange,
              onEditableChange: onPrimaryTableCellEditChange
            });
            if (props.editableRowKeys) {
              var _errorListMap$value;
              var rowValue = get_1(p.row, props.rowKey || "id");
              cellProps.editable = editableKeysMap.value[rowValue] || false;
              var key = [rowValue, p.col.colKey].join("__");
              var errorList = (_errorListMap$value = errorListMap.value) === null || _errorListMap$value === void 0 ? void 0 : _errorListMap$value[key];
              errorList && (cellProps.errors = errorList);
            }
            if (props.editableCellState) cellProps.readonly = !props.editableCellState(p);
            return createVNode(EditableCell, cellProps, context.slots);
          };
        }
        if ((_item$children2 = item.children) !== null && _item$children2 !== void 0 && _item$children2.length) item.children = getColumns(item.children);
        if (!item.children || (_item$children3 = item.children) !== null && _item$children3 !== void 0 && _item$children3.length) arr.push(item);
      };
      for (var i = 0, len = columns2.length; i < len; i++) {
        var _ret = _loop();
        if (_ret === "continue") continue;
      }
      return arr;
    };
    var tColumns = computed(function () {
      var cols = getColumns(columns.value);
      if (showExpandIconColumn.value) cols.unshift(getExpandColumn());
      return cols;
    });
    var onInnerPageChange = function onInnerPageChange(pageInfo, newData) {
      var _props$onPageChange, _props$onChange;
      currentPaginateData.value = newData;
      (_props$onPageChange = props.onPageChange) === null || _props$onPageChange === void 0 ? void 0 : _props$onPageChange.call(props, pageInfo, newData);
      var changeParams = [{
        pagination: pageInfo
      }, {
        trigger: "pagination",
        currentData: newData
      }];
      (_props$onChange = props.onChange) === null || _props$onChange === void 0 ? void 0 : _props$onChange.call.apply(_props$onChange, [props].concat(changeParams));
      if (!props.reserveSelectedRowOnPaginate) {
        setTSelectedRowKeys([], {
          selectedRowData: [],
          type: "uncheck",
          currentRowKey: "CLEAR_ON_PAGINATE"
        });
      }
    };
    var timer;
    var DURATION = 250;
    var onInnerRowClick = function onInnerRowClick(params) {
      if (!props.onRowDblclick) {
        onInnerExpandRowClick(params);
        onInnerSelectRowClick(params);
        return;
      }
      if (timer) {
        clearTimeout(timer);
        timer = void 0;
      } else {
        timer = setTimeout(function () {
          onInnerExpandRowClick(params);
          onInnerSelectRowClick(params);
          timer = void 0;
        }, DURATION);
      }
    };
    return function () {
      var formatNode = function formatNode(api, renderInnerNode, condition, extra) {
        if (!condition) return props[api];
        var innerNode = renderInnerNode(h);
        var propsNode = renderTNode(api);
        if (innerNode && !propsNode) return function () {
          return innerNode;
        };
        if (propsNode && !innerNode) return function () {
          return propsNode;
        };
        if (innerNode && propsNode) {
          return function () {
            return extra !== null && extra !== void 0 && extra.reverse ? createVNode("div", null, [innerNode, propsNode]) : createVNode("div", null, [propsNode, innerNode]);
          };
        }
        return null;
      };
      var isColumnController = !!(columnController.value && Object.keys(columnController.value).length);
      var placement = isColumnController ? columnController.value.placement || "top-right" : "";
      var isBottomController = isColumnController && (placement === null || placement === void 0 ? void 0 : placement.indexOf("bottom")) !== -1;
      var topContent = formatNode("topContent", renderColumnController, isColumnController && !isBottomController);
      var bottomContent = formatNode("bottomContent", renderColumnController, isBottomController, {
        reverse: true
      });
      var firstFullRow = formatNode("firstFullRow", renderFirstFilterRow, !hasEmptyCondition.value);
      var lastFullRow = formatNode("lastFullRow", renderAsyncLoading, !!props.asyncLoading);
      var baseTableProps2 = _objectSpread(_objectSpread({}, omit_1(props, OMIT_PROPS)), {}, {
        rowClassName: tRowClassNames.value,
        rowAttributes: tRowAttributes.value,
        columns: tColumns.value,
        topContent: topContent,
        bottomContent: bottomContent,
        firstFullRow: firstFullRow,
        lastFullRow: lastFullRow,
        thDraggable: props.dragSort === "col",
        onPageChange: onInnerPageChange,
        renderExpandedRow: showExpandedRow.value ? renderExpandedRow : void 0
      });
      if (props.expandOnRowClick || props.selectOnRowClick) baseTableProps2.onRowClick = onInnerRowClick;
      return createVNode(_BaseTable, mergeProps({
        "ref": primaryTableRef
      }, baseTableProps2, {
        "class": primaryTableClasses.value,
        "onLeafColumnsChange": setDragSortColumns
      }), context.slots);
    };
  }
});

export { _PrimaryTable as default };
//# sourceMappingURL=primary-table.mjs.map
