"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
const select_vue_vue_type_script_lang = require("./select.vue_vue_type_script_lang.js");
const Vue = require("vue");
const _hoisted_1 = [
  "id",
  "value",
  "autocomplete",
  "tabindex",
  "aria-expanded",
  "aria-label",
  "disabled",
  "aria-controls",
  "aria-activedescendant",
  "readonly",
  "name"
];
const _hoisted_2 = ["textContent"];
const _hoisted_3 = { key: 1 };
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_el_tag = Vue.resolveComponent("el-tag");
  const _component_el_tooltip = Vue.resolveComponent("el-tooltip");
  const _component_el_icon = Vue.resolveComponent("el-icon");
  const _component_el_select_menu = Vue.resolveComponent("el-select-menu");
  const _directive_click_outside = Vue.resolveDirective("click-outside");
  return Vue.withDirectives((Vue.openBlock(), Vue.createElementBlock("div", {
    ref: "selectRef",
    class: Vue.normalizeClass([_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]),
    onMouseenter: _cache[15] || (_cache[15] = ($event) => _ctx.states.inputHovering = true),
    onMouseleave: _cache[16] || (_cache[16] = ($event) => _ctx.states.inputHovering = false)
  }, [Vue.createVNode(_component_el_tooltip, {
    ref: "tooltipRef",
    visible: _ctx.dropdownMenuVisible,
    teleported: _ctx.teleported,
    "popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
    "popper-style": _ctx.popperStyle,
    "gpu-acceleration": false,
    "stop-popper-mouse-event": false,
    "popper-options": _ctx.popperOptions,
    "fallback-placements": _ctx.fallbackPlacements,
    effect: _ctx.effect,
    placement: _ctx.placement,
    pure: "",
    transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
    trigger: "click",
    persistent: _ctx.persistent,
    "append-to": _ctx.appendTo,
    "show-arrow": _ctx.showArrow,
    offset: _ctx.offset,
    onBeforeShow: _ctx.handleMenuEnter,
    onHide: _cache[14] || (_cache[14] = ($event) => _ctx.states.isBeforeHide = false)
  }, {
    default: Vue.withCtx(() => {
      var _a;
      return [Vue.createElementVNode("div", {
        ref: "wrapperRef",
        class: Vue.normalizeClass([
          _ctx.nsSelect.e("wrapper"),
          _ctx.nsSelect.is("focused", _ctx.isFocused),
          _ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
          _ctx.nsSelect.is("filterable", _ctx.filterable),
          _ctx.nsSelect.is("disabled", _ctx.selectDisabled)
        ]),
        onClick: _cache[11] || (_cache[11] = Vue.withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent"]))
      }, [
        _ctx.$slots.prefix ? (Vue.openBlock(), Vue.createElementBlock("div", {
          key: 0,
          ref: "prefixRef",
          class: Vue.normalizeClass(_ctx.nsSelect.e("prefix"))
        }, [Vue.renderSlot(_ctx.$slots, "prefix")], 2)) : Vue.createCommentVNode("v-if", true),
        Vue.createElementVNode("div", {
          ref: "selectionRef",
          class: Vue.normalizeClass([_ctx.nsSelect.e("selection"), _ctx.nsSelect.is("near", _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.modelValue.length)])
        }, [
          _ctx.multiple ? Vue.renderSlot(_ctx.$slots, "tag", {
            key: 0,
            data: _ctx.states.cachedOptions,
            deleteTag: _ctx.deleteTag,
            selectDisabled: _ctx.selectDisabled
          }, () => {
            var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
            return [(Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(_ctx.showTagList, (item) => {
              return Vue.openBlock(), Vue.createElementBlock("div", {
                key: _ctx.getValueKey(_ctx.getValue(item)),
                class: Vue.normalizeClass(_ctx.nsSelect.e("selected-item"))
              }, [Vue.createVNode(_component_el_tag, {
                closable: !_ctx.selectDisabled && !_ctx.getDisabled(item),
                size: _ctx.collapseTagSize,
                type: _ctx.tagType,
                effect: _ctx.tagEffect,
                "disable-transitions": "",
                style: Vue.normalizeStyle(_ctx.tagStyle),
                onClose: ($event) => _ctx.deleteTag($event, item)
              }, {
                default: Vue.withCtx(() => [Vue.createElementVNode("span", { class: Vue.normalizeClass(_ctx.nsSelect.e("tags-text")) }, [Vue.renderSlot(_ctx.$slots, "label", {
                  index: _ctx.getIndex(item),
                  label: _ctx.getLabel(item),
                  value: _ctx.getValue(item)
                }, () => [Vue.createTextVNode(Vue.toDisplayString(_ctx.getLabel(item)), 1)])], 2)]),
                _: 2
              }, 1032, [
                "closable",
                "size",
                "type",
                "effect",
                "style",
                "onClose"
              ])], 2);
            }), 128)), _ctx.collapseTags && _ctx.states.cachedOptions.length > _ctx.maxCollapseTags ? (Vue.openBlock(), Vue.createBlock(_component_el_tooltip, {
              key: 0,
              ref: "tagTooltipRef",
              disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip,
              "fallback-placements": ((_a2 = _ctx.tagTooltip) == null ? void 0 : _a2.fallbackPlacements) ?? [
                "bottom",
                "top",
                "right",
                "left"
              ],
              effect: ((_b = _ctx.tagTooltip) == null ? void 0 : _b.effect) ?? _ctx.effect,
              placement: ((_c = _ctx.tagTooltip) == null ? void 0 : _c.placement) ?? "bottom",
              "popper-class": ((_d = _ctx.tagTooltip) == null ? void 0 : _d.popperClass) ?? _ctx.popperClass,
              "popper-style": ((_e = _ctx.tagTooltip) == null ? void 0 : _e.popperStyle) ?? _ctx.popperStyle,
              teleported: ((_f = _ctx.tagTooltip) == null ? void 0 : _f.teleported) ?? _ctx.teleported,
              "append-to": ((_g = _ctx.tagTooltip) == null ? void 0 : _g.appendTo) ?? _ctx.appendTo,
              "popper-options": ((_h = _ctx.tagTooltip) == null ? void 0 : _h.popperOptions) ?? _ctx.popperOptions,
              transition: (_i = _ctx.tagTooltip) == null ? void 0 : _i.transition,
              "show-after": (_j = _ctx.tagTooltip) == null ? void 0 : _j.showAfter,
              "hide-after": (_k = _ctx.tagTooltip) == null ? void 0 : _k.hideAfter,
              "auto-close": (_l = _ctx.tagTooltip) == null ? void 0 : _l.autoClose,
              offset: (_m = _ctx.tagTooltip) == null ? void 0 : _m.offset
            }, {
              default: Vue.withCtx(() => [Vue.createElementVNode("div", {
                ref: "collapseItemRef",
                class: Vue.normalizeClass(_ctx.nsSelect.e("selected-item"))
              }, [Vue.createVNode(_component_el_tag, {
                closable: false,
                size: _ctx.collapseTagSize,
                type: _ctx.tagType,
                effect: _ctx.tagEffect,
                style: Vue.normalizeStyle(_ctx.collapseTagStyle),
                "disable-transitions": ""
              }, {
                default: Vue.withCtx(() => [Vue.createElementVNode("span", { class: Vue.normalizeClass(_ctx.nsSelect.e("tags-text")) }, " + " + Vue.toDisplayString(_ctx.states.cachedOptions.length - _ctx.maxCollapseTags), 3)]),
                _: 1
              }, 8, [
                "size",
                "type",
                "effect",
                "style"
              ])], 2)]),
              content: Vue.withCtx(() => [Vue.createElementVNode("div", {
                ref: "tagMenuRef",
                class: Vue.normalizeClass(_ctx.nsSelect.e("selection"))
              }, [(Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(_ctx.collapseTagList, (selected) => {
                return Vue.openBlock(), Vue.createElementBlock("div", {
                  key: _ctx.getValueKey(_ctx.getValue(selected)),
                  class: Vue.normalizeClass(_ctx.nsSelect.e("selected-item"))
                }, [Vue.createVNode(_component_el_tag, {
                  class: "in-tooltip",
                  closable: !_ctx.selectDisabled && !_ctx.getDisabled(selected),
                  size: _ctx.collapseTagSize,
                  type: _ctx.tagType,
                  effect: _ctx.tagEffect,
                  "disable-transitions": "",
                  onClose: ($event) => _ctx.deleteTag($event, selected)
                }, {
                  default: Vue.withCtx(() => [Vue.createElementVNode("span", { class: Vue.normalizeClass(_ctx.nsSelect.e("tags-text")) }, [Vue.renderSlot(_ctx.$slots, "label", {
                    index: _ctx.getIndex(selected),
                    label: _ctx.getLabel(selected),
                    value: _ctx.getValue(selected)
                  }, () => [Vue.createTextVNode(Vue.toDisplayString(_ctx.getLabel(selected)), 1)])], 2)]),
                  _: 2
                }, 1032, [
                  "closable",
                  "size",
                  "type",
                  "effect",
                  "onClose"
                ])], 2);
              }), 128))], 2)]),
              _: 3
            }, 8, [
              "disabled",
              "fallback-placements",
              "effect",
              "placement",
              "popper-class",
              "popper-style",
              "teleported",
              "append-to",
              "popper-options",
              "transition",
              "show-after",
              "hide-after",
              "auto-close",
              "offset"
            ])) : Vue.createCommentVNode("v-if", true)];
          }) : Vue.createCommentVNode("v-if", true),
          Vue.createElementVNode("div", { class: Vue.normalizeClass([
            _ctx.nsSelect.e("selected-item"),
            _ctx.nsSelect.e("input-wrapper"),
            _ctx.nsSelect.is("hidden", !_ctx.filterable || _ctx.selectDisabled || !_ctx.states.inputValue && !_ctx.isFocused)
          ]) }, [Vue.createElementVNode("input", {
            id: _ctx.inputId,
            ref: "inputRef",
            value: _ctx.states.inputValue,
            style: Vue.normalizeStyle(_ctx.inputStyle),
            autocomplete: _ctx.autocomplete,
            tabindex: _ctx.tabindex,
            "aria-autocomplete": "none",
            "aria-haspopup": "listbox",
            autocapitalize: "off",
            "aria-expanded": _ctx.expanded,
            "aria-label": _ctx.ariaLabel,
            class: Vue.normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
            disabled: _ctx.selectDisabled,
            role: "combobox",
            "aria-controls": _ctx.contentId,
            "aria-activedescendant": _ctx.states.hoveringIndex >= 0 ? `${_ctx.contentId}-${_ctx.states.hoveringIndex}` : "",
            readonly: !_ctx.filterable,
            spellcheck: "false",
            type: "text",
            name: _ctx.name,
            onInput: _cache[0] || (_cache[0] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
            onChange: _cache[1] || (_cache[1] = Vue.withModifiers(() => {
            }, ["stop"])),
            onCompositionstart: _cache[2] || (_cache[2] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
            onCompositionupdate: _cache[3] || (_cache[3] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
            onCompositionend: _cache[4] || (_cache[4] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
            onKeydown: [
              _cache[5] || (_cache[5] = Vue.withKeys(Vue.withModifiers(($event) => _ctx.onKeyboardNavigate("backward"), ["stop", "prevent"]), ["up"])),
              _cache[6] || (_cache[6] = Vue.withKeys(Vue.withModifiers(($event) => _ctx.onKeyboardNavigate("forward"), ["stop", "prevent"]), ["down"])),
              _cache[7] || (_cache[7] = Vue.withKeys(Vue.withModifiers((...args) => _ctx.onKeyboardSelect && _ctx.onKeyboardSelect(...args), ["stop", "prevent"]), ["enter"])),
              _cache[8] || (_cache[8] = Vue.withKeys(Vue.withModifiers((...args) => _ctx.handleEsc && _ctx.handleEsc(...args), ["stop", "prevent"]), ["esc"])),
              _cache[9] || (_cache[9] = Vue.withKeys(Vue.withModifiers((...args) => _ctx.handleDel && _ctx.handleDel(...args), ["stop"]), ["delete"]))
            ],
            onClick: _cache[10] || (_cache[10] = Vue.withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"]))
          }, null, 46, _hoisted_1), _ctx.filterable ? (Vue.openBlock(), Vue.createElementBlock("span", {
            key: 0,
            ref: "calculatorRef",
            "aria-hidden": "true",
            class: Vue.normalizeClass(_ctx.nsSelect.e("input-calculator")),
            textContent: Vue.toDisplayString(_ctx.states.inputValue)
          }, null, 10, _hoisted_2)) : Vue.createCommentVNode("v-if", true)], 2),
          _ctx.shouldShowPlaceholder ? (Vue.openBlock(), Vue.createElementBlock("div", {
            key: 1,
            class: Vue.normalizeClass([
              _ctx.nsSelect.e("selected-item"),
              _ctx.nsSelect.e("placeholder"),
              _ctx.nsSelect.is("transparent", !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue)
            ])
          }, [_ctx.hasModelValue ? Vue.renderSlot(_ctx.$slots, "label", {
            key: 0,
            index: ((_a = _ctx.allOptionsValueMap.get(_ctx.modelValue)) == null ? void 0 : _a.index) ?? -1,
            label: _ctx.currentPlaceholder,
            value: _ctx.modelValue
          }, () => [Vue.createElementVNode("span", null, Vue.toDisplayString(_ctx.currentPlaceholder), 1)]) : (Vue.openBlock(), Vue.createElementBlock("span", _hoisted_3, Vue.toDisplayString(_ctx.currentPlaceholder), 1))], 2)) : Vue.createCommentVNode("v-if", true)
        ], 2),
        Vue.createElementVNode("div", {
          ref: "suffixRef",
          class: Vue.normalizeClass(_ctx.nsSelect.e("suffix"))
        }, [
          _ctx.iconComponent ? Vue.withDirectives((Vue.openBlock(), Vue.createBlock(_component_el_icon, {
            key: 0,
            class: Vue.normalizeClass([
              _ctx.nsSelect.e("caret"),
              _ctx.nsInput.e("icon"),
              _ctx.iconReverse
            ])
          }, {
            default: Vue.withCtx(() => [(Vue.openBlock(), Vue.createBlock(Vue.resolveDynamicComponent(_ctx.iconComponent)))]),
            _: 1
          }, 8, ["class"])), [[Vue.vShow, !_ctx.showClearBtn]]) : Vue.createCommentVNode("v-if", true),
          _ctx.showClearBtn && _ctx.clearIcon ? (Vue.openBlock(), Vue.createBlock(_component_el_icon, {
            key: 1,
            class: Vue.normalizeClass([
              _ctx.nsSelect.e("caret"),
              _ctx.nsInput.e("icon"),
              _ctx.nsSelect.e("clear")
            ]),
            onClick: Vue.withModifiers(_ctx.handleClear, ["prevent", "stop"])
          }, {
            default: Vue.withCtx(() => [(Vue.openBlock(), Vue.createBlock(Vue.resolveDynamicComponent(_ctx.clearIcon)))]),
            _: 1
          }, 8, ["class", "onClick"])) : Vue.createCommentVNode("v-if", true),
          _ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (Vue.openBlock(), Vue.createBlock(_component_el_icon, {
            key: 2,
            class: Vue.normalizeClass([
              _ctx.nsInput.e("icon"),
              _ctx.nsInput.e("validateIcon"),
              _ctx.nsInput.is("loading", _ctx.validateState === "validating")
            ])
          }, {
            default: Vue.withCtx(() => [(Vue.openBlock(), Vue.createBlock(Vue.resolveDynamicComponent(_ctx.validateIcon)))]),
            _: 1
          }, 8, ["class"])) : Vue.createCommentVNode("v-if", true)
        ], 2)
      ], 2)];
    }),
    content: Vue.withCtx(() => [Vue.createVNode(_component_el_select_menu, {
      id: _ctx.contentId,
      ref: "menuRef",
      data: _ctx.filteredOptions,
      width: _ctx.popperSize - _ctx.BORDER_HORIZONTAL_WIDTH,
      "hovering-index": _ctx.states.hoveringIndex,
      "scrollbar-always-on": _ctx.scrollbarAlwaysOn,
      "aria-label": _ctx.ariaLabel
    }, Vue.createSlots({
      default: Vue.withCtx((scope) => [Vue.renderSlot(_ctx.$slots, "default", Vue.normalizeProps(Vue.guardReactiveProps(scope)))]),
      _: 2
    }, [
      _ctx.$slots.header ? {
        name: "header",
        fn: Vue.withCtx(() => [Vue.createElementVNode("div", {
          class: Vue.normalizeClass(_ctx.nsSelect.be("dropdown", "header")),
          onClick: _cache[12] || (_cache[12] = Vue.withModifiers(() => {
          }, ["stop"]))
        }, [Vue.renderSlot(_ctx.$slots, "header")], 2)]),
        key: "0"
      } : void 0,
      _ctx.$slots.loading && _ctx.loading ? {
        name: "loading",
        fn: Vue.withCtx(() => [Vue.createElementVNode("div", { class: Vue.normalizeClass(_ctx.nsSelect.be("dropdown", "loading")) }, [Vue.renderSlot(_ctx.$slots, "loading")], 2)]),
        key: "1"
      } : _ctx.loading || _ctx.filteredOptions.length === 0 ? {
        name: "empty",
        fn: Vue.withCtx(() => [Vue.createElementVNode("div", { class: Vue.normalizeClass(_ctx.nsSelect.be("dropdown", "empty")) }, [Vue.renderSlot(_ctx.$slots, "empty", {}, () => [Vue.createElementVNode("span", null, Vue.toDisplayString(_ctx.emptyText), 1)])], 2)]),
        key: "2"
      } : void 0,
      _ctx.$slots.footer ? {
        name: "footer",
        fn: Vue.withCtx(() => [Vue.createElementVNode("div", {
          class: Vue.normalizeClass(_ctx.nsSelect.be("dropdown", "footer")),
          onClick: _cache[13] || (_cache[13] = Vue.withModifiers(() => {
          }, ["stop"]))
        }, [Vue.renderSlot(_ctx.$slots, "footer")], 2)]),
        key: "3"
      } : void 0
    ]), 1032, [
      "id",
      "data",
      "width",
      "hovering-index",
      "scrollbar-always-on",
      "aria-label"
    ])]),
    _: 3
  }, 8, [
    "visible",
    "teleported",
    "popper-class",
    "popper-style",
    "popper-options",
    "fallback-placements",
    "effect",
    "placement",
    "transition",
    "persistent",
    "append-to",
    "show-arrow",
    "offset",
    "onBeforeShow"
  ])], 34)), [[
    _directive_click_outside,
    _ctx.handleClickOutside,
    _ctx.popperRef
  ]]);
}
var select_default = /* @__PURE__ */ _pluginVue_exportHelper.default(select_vue_vue_type_script_lang.default, [["render", _sfc_render]]);
exports.default = select_default;
