import { defineComponent, computed, watchEffect, onBeforeUnmount } from 'vue';
import { useInjectTable } from '../context/TableContext.mjs';

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

export { Summary as default };
//# sourceMappingURL=Summary.mjs.map
