"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const form = require("../../../constants/form.js");
const index = require("../../../hooks/use-namespace/index.js");
const token = require("./token.js");
const index$1 = require("../../../../node_modules/@vueuse/core/index.js");
const Vue = require("vue");
var select_dropdown_vue_vue_type_script_lang_default = Vue.defineComponent({
  name: "ElSelectDropdown",
  componentName: "ElSelectDropdown",
  setup() {
    const select = Vue.inject(token.selectKey);
    const ns = index.useNamespace("select");
    const popperClass = Vue.computed(() => select.props.popperClass);
    const isMultiple = Vue.computed(() => select.props.multiple);
    const isFitInputWidth = Vue.computed(() => select.props.fitInputWidth);
    const minWidth = Vue.ref("");
    function updateMinWidth() {
      var _a;
      const offsetWidth = (_a = select.selectRef) == null ? void 0 : _a.offsetWidth;
      if (offsetWidth) minWidth.value = `${offsetWidth - form.BORDER_HORIZONTAL_WIDTH}px`;
      else minWidth.value = "";
    }
    Vue.onMounted(() => {
      updateMinWidth();
      index$1.useResizeObserver(select.selectRef, updateMinWidth);
    });
    return {
      ns,
      minWidth,
      popperClass,
      isMultiple,
      isFitInputWidth
    };
  }
});
exports.default = select_dropdown_vue_vue_type_script_lang_default;
