/**
 * ldesign v0.2.22
 * (c) 2022/12/7 16:21 built by swimly
 * @license MIT
 */

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var helper$1 = require('../../../chunks/helper.js');
var VueCompositionAPI = require('@vue/composition-api');
var pick = require('lodash/pick');
var log = require('../../../chunks/log.js');
var helper = require('../../../chunks/helper2.js');
var hooks_useVirtualScroll = require('../../../hooks/useVirtualScroll.js');
var components_loading_index = require('../../loading/index.js');
var hooks_lnode = require('../../../hooks/lnode.js');
var components_configProvider_useConfig = require('../../config-provider/useConfig.js');
var components_affix_index = require('../../affix/index.js');
var components_table_props = require('../props.js');
var components_table_hooks_useTableHeader = require('../hooks/useTableHeader.js');
var components_table_hooks_useColumnResize = require('../hooks/useColumnResize.js');
var components_table_hooks_useFixed = require('../hooks/useFixed.js');
var components_table_hooks_usePagination = require('../hooks/usePagination.js');
var components_table_hooks_useAffix = require('../hooks/useAffix.js');
var components_table_hooks_useStyle = require('../hooks/useStyle.js');
var components_table_hooks_useClassName = require('../hooks/useClassName.js');
var components_table_utils = require('../utils.js');
var components_table_core_tbody = require('./tbody.js');
var components_table_core_tr = require('./tr.js');
var components_table_core_thead = require('./thead.js');
var components_table_core_tfoot = require('./tfoot.js');
require('../../../chunks/_commonjsHelpers-fe796db6.js');
require('../../../utils/withInstall.js');
require('vue');
require('lodash/capitalize');
require('../../../config.js');
require('../../loading/loading.js');
require('../../../utils/dom.js');
require('raf');
require('lodash/isString');
require('../../../utils/easing.js');
require('../../../utils/render-node.js');
require('lodash');
require('../../../utils/transfer-dom.js');
require('../../config-provider/config-receiver.js');
require('lodash/mergeWith');
require('../../config-provider/context.js');
require('lodash/merge');
require('../../../chunks/zh_CN.js');
require('../../../utils/mixins.js');
require('../../loading/props.js');
require('../../loading/icon/gradient.js');
require('../../../chunks/defineProperty-19da3d4c.js');
require('../../../chunks/set-style.js');
require('../../loading/plugin.js');
require('lodash/isEmpty');
require('lodash/isFunction');
require('lodash/camelCase');
require('lodash/kebabCase');
require('../../../hooks/render-lnode.js');
require('../../affix/affix.js');
require('../../affix/props.js');
require('./ellipsis.js');
require('lodash/debounce');
require('../../tooltip/index.js');
require('../../../utils/map-props.js');
require('../../tooltip/tooltip.js');
require('../../popup/props.js');
require('../../popup/popup.js');
require('@popperjs/core');
require('../../../utils/helper.js');
require('../../popup/container.js');
require('../../tooltip/props.js');
require('../hooks/useMultiHeader.js');
require('lodash/isNumber');
require('../../../chunks/utils3.js');
require('../../../chunks/isFunction-cb08cfdf.js');
require('../../../chunks/isObjectLike-51896b77.js');
require('../../../chunks/isNumber-13851330.js');
require('lodash/get');
require('../../pagination/index.js');
require('../../pagination/pagination-mini.js');
require('lodash/isObject');
require('@ldesign/icons-vue');
require('../../../hooks/useConfig.js');
require('../../../hooks/useGlobalIcon.js');
require('../../button/index.js');
require('../../button/button.js');
require('../../../utils/ripple.js');
require('../../button/props.js');
require('../../pagination/props.js');
require('../../pagination/pagination.js');
require('../../input-number/index.js');
require('../../input-number/input-number.js');
require('../../input/index.js');
require('../../input/input.js');
require('../../../utils/event.js');
require('../../input/props.js');
require('../../input/group.js');
require('../../input-number/props.js');
require('../../input-number/hooks/use-input-number.js');
require('../../../chunks/isArray-6b6e7094.js');
require('../../../hooks/useCommonClassName.js');
require('../../../hooks/useVModel.js');
require('../../../hooks/useFormDisabled.js');
require('../../select/index.js');
require('../../select/select.js');
require('lodash/cloneDeep');
require('lodash/isArray');
require('../../../hooks/useDefaultValue.js');
require('../../popup/index.js');
require('../../tag/index.js');
require('../../tag/tag.js');
require('../../tag/props.js');
require('../../tag/check-tag.js');
require('../../select-input/index.js');
require('../../select-input/select-input.js');
require('../../select-input/props.js');
require('../../select-input/hooks/use-single.js');
require('../../select-input/hooks/use-multiple.js');
require('../../tag-input/index.js');
require('../../tag-input/tag-input.js');
require('../../tag-input/props.js');
require('../../tag-input/hooks/use-tag-scroll.js');
require('../../tag-input/hooks/use-tag-list.js');
require('../../tag-input/hooks/use-hover.js');
require('../../tag-input/hooks/use-drag-sorter.js');
require('../../select-input/hooks/use-overlay-innerstyle.js');
require('../../common/fake-arrow.js');
require('../../select/option.js');
require('../../checkbox/index.js');
require('../../checkbox/group.js');
require('lodash/intersection');
require('../../checkbox/checkbox.js');
require('../../checkbox/props.js');
require('../../../hooks/useLazyLoad.js');
require('../../../chunks/observe.js');
require('../../select/utils.js');
require('../../select/props.js');
require('../../select/select-panel.js');
require('../../select/hooks/use-select-options.js');
require('../../select/option-group.js');
require('../../input-adornment/index.js');
require('../../input-adornment/input-adornment.js');
require('../../input-adornment/props.js');
require('../hooks/useRowspanAndColspan.js');
require('lodash/upperFirst');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var pick__default = /*#__PURE__*/_interopDefaultLegacy(pick);

const BASE_TABLE_EVENTS = ["page-change", "cell-click", "scroll", "scrollX", "scrollY"];
const BASE_TABLE_ALL_EVENTS = components_table_core_tr.ROW_LISTENERS.map(t => `row-${t}`).concat(BASE_TABLE_EVENTS);
var _BaseTable = VueCompositionAPI.defineComponent({
  name: "LBaseTable",
  props: {
    ...components_table_props.BaseTableProps,
    renderExpandedRow: Function,
    onLeafColumnsChange: Function
  },
  setup(props2, context) {
    const renderLNode = hooks_lnode.useLNodeJSX();
    const tableRef = VueCompositionAPI.ref();
    const tableElmRef = VueCompositionAPI.ref();
    const tableBodyRef = VueCompositionAPI.ref();
    const bottomContentRef = VueCompositionAPI.ref();
    const tableFootHeight = VueCompositionAPI.ref(0);
    const {
      classPrefix,
      virtualScrollClasses,
      tableLayoutClasses,
      tableBaseClass,
      tableColFixedClasses
    } = components_table_hooks_useClassName["default"]();
    const {
      tableClasses,
      sizeClassNames,
      tableContentStyles,
      tableElementStyles
    } = components_table_hooks_useStyle["default"](props2);
    const {
      global
    } = components_configProvider_useConfig.useConfig("table");
    const {
      isMultipleHeader,
      spansAndLeafNodes,
      thList
    } = components_table_hooks_useTableHeader["default"](props2);
    const finalColumns = VueCompositionAPI.computed(() => spansAndLeafNodes.value?.leafColumns || props2.columns);
    const paginationAffixRef = VueCompositionAPI.ref();
    const horizontalScrollAffixRef = VueCompositionAPI.ref();
    const headerTopAffixRef = VueCompositionAPI.ref();
    const footerBottomAffixRef = VueCompositionAPI.ref();
    const {
      scrollbarWidth,
      tableWidth,
      tableElmWidth,
      tableContentRef,
      isFixedHeader,
      isWidthOverflow,
      isFixedColumn,
      thWidthList,
      showColumnShadow,
      rowAndColFixedPosition,
      setData,
      refreshTable,
      emitScrollEvent,
      setUseFixedTableElmRef,
      updateColumnFixedShadow,
      getThWidthList,
      updateThWidthList,
      setRecalculateColWidthFuncRef,
      addTableResizeObserver
    } = components_table_hooks_useFixed["default"](props2, context, finalColumns, {
      paginationAffixRef,
      horizontalScrollAffixRef,
      headerTopAffixRef,
      footerBottomAffixRef
    });
    const {
      affixHeaderRef,
      affixFooterRef,
      horizontalScrollbarRef,
      paginationRef,
      showAffixHeader,
      showAffixFooter,
      showAffixPagination,
      onHorizontalScroll,
      updateAffixHeaderOrFooter,
      setTableContentRef
    } = components_table_hooks_useAffix["default"](props2);
    const {
      dataSource,
      innerPagination,
      isPaginateData,
      renderPagination
    } = components_table_hooks_usePagination["default"](props2, context);
    const columnResizeParams = components_table_hooks_useColumnResize["default"](tableContentRef, refreshTable, getThWidthList, updateThWidthList);
    const {
      resizeLineRef,
      resizeLineStyle,
      recalculateColWidth,
      setEffectColMap
    } = columnResizeParams;
    setRecalculateColWidthFuncRef(recalculateColWidth);
    const dynamicBaseTableClasses = VueCompositionAPI.computed(() => [tableClasses.value, {
      [tableBaseClass.headerFixed]: isFixedHeader.value,
      [tableBaseClass.columnFixed]: isFixedColumn.value,
      [tableBaseClass.widthOverflow]: isWidthOverflow.value,
      [tableBaseClass.multipleHeader]: isMultipleHeader.value,
      [tableColFixedClasses.leftShadow]: showColumnShadow.left,
      [tableColFixedClasses.rightShadow]: showColumnShadow.right,
      [tableBaseClass.columnResizableTable]: props2.resizable
    }]);
    const tableElmClasses = VueCompositionAPI.computed(() => [[tableLayoutClasses[props2.tableLayout]], {
      [tableBaseClass.fullHeight]: props2.height
    }]);
    const isVirtual = VueCompositionAPI.computed(() => props2.scroll?.type === "virtual" && props2.data?.length > (props2.scroll?.threshold || 100));
    const showRightDivider = VueCompositionAPI.computed(() => props2.bordered && isFixedHeader.value && (isMultipleHeader.value && isWidthOverflow.value || !isMultipleHeader.value));
    const dividerBottom = VueCompositionAPI.computed(() => {
      if (!props2.bordered) return 0;
      const bottomRect = bottomContentRef.value?.getBoundingClientRect();
      const paginationRect = paginationRef.value?.getBoundingClientRect();
      return (bottomRect?.height || 0) + (paginationRect?.height || 0);
    });
    const columnResizable = VueCompositionAPI.computed(() => props2.allowResizeColumnWidth === void 0 ? props2.resizable : props2.allowResizeColumnWidth);
    VueCompositionAPI.watch(tableElmRef, () => {
      setUseFixedTableElmRef(tableElmRef.value);
    });
    VueCompositionAPI.watch(() => [props2.data, dataSource, isPaginateData], () => {
      setData(isPaginateData.value ? dataSource.value : props2.data);
    });
    VueCompositionAPI.watch(spansAndLeafNodes, () => {
      props2.onLeafColumnsChange?.(spansAndLeafNodes.value.leafColumns);
      context.emit("LeafColumnsChange", spansAndLeafNodes.value.leafColumns);
    }, {
      immediate: true
    });
    VueCompositionAPI.watch(thList, () => {
      setEffectColMap(thList.value[0], null);
    }, {
      immediate: true
    });
    const onFixedChange = () => {
      VueCompositionAPI.nextTick(() => {
        onHorizontalScroll();
        updateAffixHeaderOrFooter();
      });
    };
    const getListener = () => {
      const listener = {};
      BASE_TABLE_ALL_EVENTS.forEach(key => {
        listener[key] = function () {
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          context.emit(key, ...args);
        };
      });
      return listener;
    };
    const {
      type,
      rowHeight,
      bufferSize = 20,
      isFixedRowHeight = false
    } = props2.scroll || {};
    const {
      data
    } = VueCompositionAPI.toRefs(props2);
    const {
      trs = null,
      scrollHeight = null,
      visibleData = null,
      translateY = null,
      handleScroll: handleVirtualScroll = null,
      handleRowMounted = null
    } = type === "virtual" ? hooks_useVirtualScroll["default"]({
      container: tableContentRef,
      data,
      fixedHeight: isFixedRowHeight,
      lineHeight: rowHeight,
      bufferSize,
      threshold: props2.scroll?.threshold
    }) : {};
    VueCompositionAPI.provide("tableContentRef", tableContentRef);
    VueCompositionAPI.provide("rowHeightRef", VueCompositionAPI.ref(rowHeight));
    let lastScrollY = 0;
    const onInnerVirtualScroll = e => {
      const target = e.target || e.srcElement;
      const top = target.scrollTop;
      if (lastScrollY !== top) {
        isVirtual.value && handleVirtualScroll();
      } else {
        lastScrollY = 0;
        updateColumnFixedShadow(target);
      }
      lastScrollY = top;
      emitScrollEvent(e);
    };
    const getTFootHeight = () => {
      if (!tableElmRef.value) return;
      tableFootHeight.value = tableElmRef.value.querySelector("tfoot")?.getBoundingClientRect().height;
    };
    VueCompositionAPI.watch(tableContentRef, () => {
      setTableContentRef(tableContentRef.value);
    });
    VueCompositionAPI.watch(tableElmRef, getTFootHeight);
    VueCompositionAPI.watch(tableRef, tableRef2 => {
      addTableResizeObserver(tableRef2);
    });
    VueCompositionAPI.onMounted(() => {
      getTFootHeight();
      setTableContentRef(tableContentRef.value);
      addTableResizeObserver(tableRef.value);
    });
    return {
      columnResizable,
      thList,
      classPrefix,
      innerPagination,
      isVirtual,
      global,
      tableFootHeight,
      tableWidth,
      tableElmWidth,
      tableRef,
      tableElmRef,
      sizeClassNames,
      tableBaseClass,
      spansAndLeafNodes,
      dynamicBaseTableClasses,
      tableContentStyles,
      tableElementStyles,
      virtualScrollClasses,
      tableLayoutClasses,
      tableElmClasses,
      dividerBottom,
      tableContentRef,
      isFixedHeader,
      isWidthOverflow,
      isFixedColumn,
      rowAndColFixedPosition,
      showColumnShadow,
      thWidthList,
      isPaginateData,
      dataSource,
      scrollType: type,
      rowHeight,
      trs,
      bufferSize,
      scrollHeight,
      visibleData,
      translateY,
      affixHeaderRef,
      affixFooterRef,
      paginationRef,
      bottomContentRef,
      showAffixHeader,
      showAffixFooter,
      scrollbarWidth,
      isMultipleHeader,
      showRightDivider,
      resizeLineRef,
      resizeLineStyle,
      columnResizeParams,
      horizontalScrollbarRef,
      tableBodyRef,
      showAffixPagination,
      getListener,
      renderPagination,
      renderLNode,
      handleRowMounted,
      onFixedChange,
      onHorizontalScroll,
      updateAffixHeaderOrFooter,
      refreshTable,
      onInnerVirtualScroll,
      paginationAffixRef,
      horizontalScrollAffixRef,
      headerTopAffixRef,
      footerBottomAffixRef
    };
  },
  methods: {
    renderColGroup(columns) {
      let isAffixHeader = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
      const h = this.$createElement;
      const defaultColWidth = this.tableLayout === "fixed" && this.isWidthOverflow ? "100px" : void 0;
      return h("colgroup", [columns.map(col => {
        const style = {
          width: components_table_hooks_useStyle.formatCSSUnit((isAffixHeader || this.columnResizable ? this.thWidthList[col.colKey] : void 0) || col.width) || defaultColWidth
        };
        if (col.minWidth) style.minWidth = components_table_hooks_useStyle.formatCSSUnit(col.minWidth);
        return h("col", {
          "key": col.colKey,
          "style": style
        });
      })]);
    },
    getHeadProps() {
      let isAffixHeader = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
      const headProps = {
        isFixedHeader: this.isFixedHeader,
        rowAndColFixedPosition: this.rowAndColFixedPosition,
        isMultipleHeader: this.isMultipleHeader,
        bordered: this.bordered,
        spansAndLeafNodes: this.spansAndLeafNodes,
        thList: this.thList,
        thWidthList: isAffixHeader || this.columnResizable ? this.thWidthList : {},
        resizable: this.resizable,
        columnResizeParams: this.columnResizeParams,
        classPrefix: this.classPrefix,
        ellipsisOverlayClassName: this.size !== "medium" ? this.sizeClassNames[this.size] : ""
      };
      return headProps;
    },
    renderFixedHeader(columns) {
      const h = this.$createElement;
      if (!this.showHeader) return null;
      const onlyVirtualScrollBordered = !!(this.isVirtual && !this.headerAffixedTop && this.bordered) && /Chrome/.test(navigator?.userAgent);
      const borderWidth = this.bordered && onlyVirtualScrollBordered ? 1 : 0;
      const barWidth = this.isWidthOverflow ? this.scrollbarWidth : 0;
      const IEHeaderWrap = helper.getIEVersion() <= 11 ? 4 : 0;
      const affixHeaderHeight = (this.affixHeaderRef?.getBoundingClientRect().height || 0) - IEHeaderWrap;
      const affixHeaderWrapHeight = affixHeaderHeight - barWidth - borderWidth;
      const headerOpacity = this.headerAffixedTop ? Number(this.showAffixHeader) : 1;
      const affixHeaderWrapHeightStyle = {
        width: `${this.tableWidth}px`,
        height: `${affixHeaderWrapHeight}px`,
        opacity: headerOpacity,
        marginTop: onlyVirtualScrollBordered ? `${borderWidth}px` : 0
      };
      const colgroup = this.renderColGroup(columns, true);
      const affixedLeftBorder = this.bordered ? 1 : 0;
      const affixedHeader = Boolean((this.headerAffixedTop || this.isVirtual) && this.tableWidth) && h("div", {
        "ref": "affixHeaderRef",
        "style": {
          width: `${this.tableWidth - affixedLeftBorder}px`,
          opacity: headerOpacity
        },
        "class": ["scrollbar", {
          [this.tableBaseClass.affixedHeaderElm]: this.headerAffixedTop || this.isVirtual
        }]
      }, [h("table", {
        "class": this.tableElmClasses,
        "style": {
          ...this.tableElementStyles,
          width: `${this.tableElmWidth}px`
        }
      }, [colgroup, h(components_table_core_thead["default"], helper$1.helper([{
        "scopedSlots": this.$scopedSlots
      }, {
        "props": this.getHeadProps(true)
      }]))])]);
      const affixHeaderWithWrap = h("div", {
        "class": this.tableBaseClass.affixedHeaderWrap,
        "style": affixHeaderWrapHeightStyle
      }, [affixedHeader]);
      return affixHeaderWithWrap;
    },
    renderAffixedFooter(columns) {
      const h = this.$createElement;
      const barWidth = this.isWidthOverflow ? this.scrollbarWidth : 0;
      const affixedLeftBorder = this.bordered ? 1 : 0;
      let marginScrollbarWidth = barWidth;
      if (this.bordered) marginScrollbarWidth += 1;
      const affixedFooter = Boolean(this.footerAffixedBottom && this.footData?.length && this.tableWidth) && h(components_affix_index.Affix, helper$1.helper([{
        "class": this.tableBaseClass.affixedFooterWrap,
        "on": {
          "fixedChange": this.onFixedChange
        },
        "attrs": {
          "offsetBottom": marginScrollbarWidth || 0
        }
      }, {
        "props": components_table_utils.getAffixProps(this.footerAffixedBottom, this.footerAffixProps)
      }, {
        "style": {
          marginTop: `${-1 * (this.tableFootHeight + marginScrollbarWidth)}px`
        },
        "ref": "footerBottomAffixRef"
      }]), [h("div", {
        "ref": "affixFooterRef",
        "style": {
          width: `${this.tableWidth - affixedLeftBorder}px`,
          opacity: Number(this.showAffixFooter)
        },
        "class": ["scrollbar", {
          [this.tableBaseClass.affixedFooterElm]: this.footerAffixedBottom || this.isVirtual
        }]
      }, [h("table", {
        "class": this.tableElmClasses,
        "style": {
          ...this.tableElementStyles,
          width: `${this.tableElmWidth}px`
        }
      }, [this.renderColGroup(columns, true), h(components_table_core_tfoot["default"], {
        "attrs": {
          "rowKey": this.rowKey,
          "isFixedHeader": this.isFixedHeader,
          "rowAndColFixedPosition": this.rowAndColFixedPosition,
          "footData": this.footData,
          "columns": columns,
          "rowAttributes": this.rowAttributes,
          "rowClassName": this.rowClassName,
          "thWidthList": this.thWidthList,
          "footerSummary": this.footerSummary,
          "rowspanAndColspanInFooter": this.rowspanAndColspanInFooter
        },
        "scopedSlots": this.$scopedSlots
      })])])]);
      return affixedFooter;
    },
    renderAffixedHeader(columns) {
      const h = this.$createElement;
      if (!components_table_props.BaseTableProps.showHeader) return null;
      return !!(this.isVirtual || this.headerAffixedTop) && (this.headerAffixedTop ? h(components_affix_index.Affix, helper$1.helper([{
        "attrs": {
          "offsetTop": 0
        }
      }, {
        "props": components_table_utils.getAffixProps(this.headerAffixedTop, this.headerAffixProps)
      }, {
        "on": {
          "fixedChange": this.onFixedChange
        },
        "ref": "headerTopAffixRef"
      }]), [this.renderFixedHeader(columns)]) : this.isFixedHeader && this.renderFixedHeader(columns));
    }
  },
  render(h) {
    const {
      rowAndColFixedPosition
    } = this;
    const data = this.isPaginateData ? this.dataSource : this.data;
    const columns = this.spansAndLeafNodes?.leafColumns || this.columns;
    if (this.allowResizeColumnWidth) log.log.warn("Table", "allowResizeColumnWidth is going to be deprecated, please use resizable instead.");
    if (this.columnResizable && this.tableLayout === "auto") log.log.warn("Table", "table-layout can not be `auto` for resizable column table, set `table-layout: fixed` please.");
    const translate = `translate(0, ${this.scrollHeight}px)`;
    const virtualStyle = {
      "transform": translate,
      "-ms-transform": translate,
      "-moz-transform": translate,
      "-webkit-transform": translate
    };
    const tableBodyProps = {
      rowAndColFixedPosition,
      showColumnShadow: this.showColumnShadow,
      data: this.isVirtual ? this.visibleData : data,
      columns,
      tableElm: this.tableRef,
      tableContentElm: this.tableContentRef,
      tableWidth: this.tableWidth,
      isWidthOverflow: this.isWidthOverflow,
      isVirtual: this.isVirtual,
      translateY: this.translateY,
      scrollType: this.scrollType,
      rowHeight: this.rowHeight,
      trs: this.trs,
      bufferSize: this.bufferSize,
      scroll: this.scroll,
      classPrefix: this.classPrefix,
      cellEmptyContent: this.cellEmptyContent,
      handleRowMounted: this.handleRowMounted,
      renderExpandedRow: this.renderExpandedRow,
      ...pick__default["default"](this.$props, components_table_core_tbody.extendTableProps),
      pagination: this.innerPagination
    };
    const tBodyListener = this.getListener();
    const tableContent = h("div", helper$1.helper([{
      "ref": "tableContentRef",
      "class": this.tableBaseClass.content,
      "style": this.tableContentStyles
    }, {
      "on": {
        scroll: this.onInnerVirtualScroll
      }
    }]), [this.isVirtual && h("div", {
      "class": this.virtualScrollClasses.cursor,
      "style": virtualStyle
    }), h("table", {
      "ref": "tableElmRef",
      "class": this.tableElmClasses,
      "style": this.tableElementStyles
    }, [this.renderColGroup(columns, false), this.showHeader && h(components_table_core_thead["default"], helper$1.helper([{
      "scopedSlots": this.$scopedSlots
    }, {
      "props": this.getHeadProps(false)
    }])), h(components_table_core_tbody["default"], helper$1.helper([{
      "ref": "tableBodyRef",
      "scopedSlots": this.$scopedSlots
    }, {
      "props": tableBodyProps
    }, {}, {
      "on": tBodyListener
    }])), h(components_table_core_tfoot["default"], {
      "attrs": {
        "rowKey": this.rowKey,
        "isFixedHeader": this.isFixedHeader,
        "rowAndColFixedPosition": rowAndColFixedPosition,
        "footData": this.footData,
        "columns": columns,
        "rowAttributes": this.rowAttributes,
        "rowClassName": this.rowClassName,
        "footerSummary": this.footerSummary,
        "rowspanAndColspanInFooter": this.rowspanAndColspanInFooter
      },
      "scopedSlots": this.$scopedSlots
    })])]);
    const customLoadingText = this.renderLNode("loading");
    const loadingContent = this.loading !== void 0 && h(components_loading_index.Loading, helper$1.helper([{
      "attrs": {
        "loading": !!this.loading,
        "text": customLoadingText ? () => customLoadingText : void 0,
        "attach": this.tableRef ? () => this.tableRef : void 0,
        "showOverlay": true
      }
    }, {
      "props": {
        size: "small",
        ...this.loadingProps
      }
    }]));
    const topContent = this.renderLNode("topContent");
    const bottomContent = this.renderLNode("bottomContent");
    const pagination = h("div", {
      "ref": "paginationRef",
      "class": this.tableBaseClass.paginationWrap,
      "style": {
        opacity: Number(this.showAffixPagination)
      }
    }, [this.renderPagination(h)]);
    const bottom = !!bottomContent && h("div", {
      "ref": "bottomContentRef",
      "class": this.tableBaseClass.bottomContent
    }, [bottomContent]);
    return h("div", {
      "ref": "tableRef",
      "class": this.dynamicBaseTableClasses,
      "style": "position: relative"
    }, [!!topContent && h("div", {
      "class": this.tableBaseClass.topContent
    }, [topContent]), this.renderAffixedHeader(columns), tableContent, this.renderAffixedFooter(columns), loadingContent, bottom, this.showRightDivider && h("div", {
      "class": this.tableBaseClass.scrollbarDivider,
      "style": {
        right: `${this.scrollbarWidth}px`,
        bottom: this.dividerBottom ? `${this.dividerBottom}px` : void 0,
        height: `${this.tableContentRef?.getBoundingClientRect().height}px`
      }
    }), this.horizontalScrollAffixedBottom && h(components_affix_index.Affix, helper$1.helper([{
      "attrs": {
        "offsetBottom": 0
      }
    }, {
      "props": components_table_utils.getAffixProps(this.horizontalScrollAffixedBottom)
    }, {
      "style": this.showAffixFooter ? {
        marginTop: `-${this.scrollbarWidth * 2}px`
      } : {
        float: "right",
        visibility: "hidden"
      },
      "ref": "horizontalScrollAffixRef"
    }]), [h("div", {
      "ref": "horizontalScrollbarRef",
      "class": ["scrollbar", this.tableBaseClass.obviousScrollbar],
      "style": {
        width: `${this.tableWidth}px`,
        overflow: "auto",
        opacity: Number(this.showAffixFooter)
      }
    }, [h("div", {
      "style": {
        width: `${this.tableElmWidth}px`,
        height: "5px"
      }
    })])]), this.paginationAffixedBottom ? h(components_affix_index.Affix, helper$1.helper([{
      "attrs": {
        "offsetBottom": 0
      }
    }, {
      "props": components_table_utils.getAffixProps(this.paginationAffixedBottom)
    }, {
      "ref": "paginationAffixRef"
    }]), [pagination]) : pagination, h("div", {
      "ref": "resizeLineRef",
      "class": this.tableBaseClass.resizeLine,
      "style": this.resizeLineStyle
    })]);
  }
});

exports.BASE_TABLE_ALL_EVENTS = BASE_TABLE_ALL_EVENTS;
exports.BASE_TABLE_EVENTS = BASE_TABLE_EVENTS;
exports["default"] = _BaseTable;
//# sourceMappingURL=base-table.js.map
