import { defineComponent, ref, onMounted, createVNode, createTextVNode } from 'vue';
import ResizeObserver from '../../../vc-resize-observer/src/index.mjs';

var MeasureCell = /* @__PURE__ */ defineComponent({
  name: "MeasureCell",
  props: ["columnKey"],
  setup(props, {
    emit
  }) {
    const tdRef = ref();
    onMounted(() => {
      if (tdRef.value)
        emit("columnResize", props.columnKey, tdRef.value.offsetWidth);
    });
    return () => {
      return createVNode(ResizeObserver, {
        "onResize": ({
          offsetWidth
        }) => {
          emit("columnResize", props.columnKey, offsetWidth);
        }
      }, {
        default: () => [createVNode("td", {
          "ref": tdRef,
          "style": {
            padding: 0,
            border: 0,
            height: 0
          }
        }, [createVNode("div", {
          "style": {
            height: 0,
            overflow: "hidden"
          }
        }, [createTextVNode("\xA0")])])]
      });
    };
  }
});

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