'use strict';

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

var vue = require('vue');
var TableContext = require('../context/TableContext.cjs');

let indexGuid = 0;
const Summary = /* @__PURE__ */ vue.defineComponent({
  name: "TableSummary",
  props: ["fixed"],
  setup(props, {
    slots
  }) {
    const tableContext = TableContext.useInjectTable();
    const uniKey = `table-summary-uni-key-${++indexGuid}`;
    const fixed = vue.computed(() => props.fixed === "" || props.fixed);
    vue.watchEffect(() => {
      tableContext.summaryCollect(uniKey, fixed.value);
    });
    vue.onBeforeUnmount(() => {
      tableContext.summaryCollect(uniKey, false);
    });
    return () => {
      var _a;
      return (_a = slots.default) == null ? void 0 : _a.call(slots);
    };
  }
});

exports.default = Summary;
//# sourceMappingURL=Summary.cjs.map
