"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const index = require("../../../../hooks/use-namespace/index.js");
const useAutoResize = require("../composables/use-auto-resize.js");
const autoResizer = require("../auto-resizer.js");
const Vue = require("vue");
const AutoResizer = /* @__PURE__ */ Vue.defineComponent({
  name: "ElAutoResizer",
  props: autoResizer.autoResizerProps,
  setup(props, { slots }) {
    const ns = index.useNamespace("auto-resizer");
    const { height, width, sizer } = useAutoResize.useAutoResize(props);
    const style = {
      width: "100%",
      height: "100%"
    };
    return () => {
      var _a;
      return Vue.createVNode("div", {
        "ref": sizer,
        "class": ns.b(),
        "style": style
      }, [(_a = slots.default) == null ? void 0 : _a.call(slots, {
        height: height.value,
        width: width.value
      })]);
    };
  }
});
exports.default = AutoResizer;
