"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;
