/**
 * ldesign v0.4.2
 * (c) 2023 ldesign
 * @license MIT
 */

import { _ as _defineProperty } from '../_chunks/dep-eb20e23f.mjs';
import { _ as _toConsumableArray } from '../_chunks/dep-e091cfd9.mjs';
import { _ as _asyncToGenerator, r as regenerator } from '../_chunks/dep-beaa677e.mjs';
import { _ as _slicedToArray } from '../_chunks/dep-55846619.mjs';
import { defineComponent, ref, toRefs, watch, computed, onMounted, withDirectives, createVNode, mergeProps, vShow } from 'vue';
import { i as isArray_1 } from '../_chunks/dep-e3b14d70.mjs';
import { i as isEmpty_1 } from '../_chunks/dep-bd03960e.mjs';
import { i as isBoolean_1 } from '../_chunks/dep-0cfc2d3f.mjs';
import { i as isFunction_1 } from '../_chunks/dep-6b22dd27.mjs';
import { i as isNil_1 } from '../_chunks/dep-51aacdc9.mjs';
import { Tree } from '../tree/index.mjs';
import { SelectInput } from '../select-input/index.mjs';
import FakeArrow from '../common-components/fake-arrow.mjs';
import { usePrefixClass } from '../hooks/useConfig.mjs';
import { useFormDisabled } from '../form/hooks.mjs';
import { useTNodeJSX, useTNodeDefault } from '../hooks/tnode.mjs';
import useVModel from '../hooks/useVModel.mjs';
import useDefaultValue from '../hooks/useDefaultValue.mjs';
import props from './props.mjs';
import { useConfig } from '../config-provider/useConfig.mjs';
import '../_chunks/dep-b4041200.mjs';
import '../_chunks/dep-cfcedf47.mjs';
import '../_chunks/dep-a0b4a044.mjs';
import '../_chunks/dep-44f056cd.mjs';
import '../_chunks/dep-a9c8a5d5.mjs';
import '../_chunks/dep-c959a6fb.mjs';
import '../_chunks/dep-10085c61.mjs';
import '../_chunks/dep-c31e1d9e.mjs';
import '../_chunks/dep-1b058de3.mjs';
import '../_chunks/dep-39cc276d.mjs';
import '../_chunks/dep-8f777748.mjs';
import '../_chunks/dep-0f0c89ff.mjs';
import '../_chunks/dep-05fa17c9.mjs';
import '../_chunks/dep-66d6733b.mjs';
import '../_chunks/dep-92e7085e.mjs';
import '../utils/withInstall.mjs';
import '../tree/td-tree.mjs';
import '../tree/props.mjs';
import '../tree/constants.mjs';
import '../tree/useTree.mjs';
import '../_common/js/tree/tree-store.mjs';
import '../_chunks/dep-b343e307.mjs';
import '../_chunks/dep-6eea369f.mjs';
import '../_chunks/dep-1cf2b129.mjs';
import '../_chunks/dep-5d966cee.mjs';
import '../_chunks/dep-0bfbf721.mjs';
import '../_chunks/dep-ae357f26.mjs';
import '../_chunks/dep-37ba476d.mjs';
import '../_chunks/dep-be27d184.mjs';
import '../_chunks/dep-774ac2d0.mjs';
import '../_chunks/dep-23a0f453.mjs';
import '../_chunks/dep-3afa94cf.mjs';
import '../_chunks/dep-2cfd5b3a.mjs';
import '../_chunks/dep-c7e9ce16.mjs';
import '../_chunks/dep-f6649a46.mjs';
import '../_chunks/dep-1fe0ad42.mjs';
import '../_chunks/dep-d54f2690.mjs';
import '../_chunks/dep-59c8420d.mjs';
import '../_chunks/dep-74848b92.mjs';
import '../_chunks/dep-ba3c0b2e.mjs';
import '../_chunks/dep-79821ff2.mjs';
import '../_chunks/dep-352691c2.mjs';
import '../_chunks/dep-c852a61a.mjs';
import 'mitt';
import '../_common/js/tree/tree-node.mjs';
import '../_chunks/dep-6f89b77e.mjs';
import '../_chunks/dep-4c3e8dd5.mjs';
import '../_chunks/dep-7acc11cb.mjs';
import '../_common/js/log/index.mjs';
import '../_common/js/log/log.mjs';
import '../_common/js/tree/tree-node-model.mjs';
import '../_chunks/dep-30451c48.mjs';
import '../_chunks/dep-e9bfe96d.mjs';
import '../_chunks/dep-ea5448a5.mjs';
import '../_chunks/dep-b2af48ba.mjs';
import '../_chunks/dep-bf74f1c2.mjs';
import '../tree/tree-item.mjs';
import '@ldesign/icons-vue-next';
import '../checkbox/index.mjs';
import '../checkbox/checkbox.mjs';
import '../hooks/useRipple.mjs';
import '../utils/set-style.mjs';
import '../hooks/useKeepAnimation.mjs';
import '../_chunks/dep-99920870.mjs';
import '../_chunks/dep-ee57d235.mjs';
import '../_common/js/global-config/default-config.mjs';
import '../_common/js/global-config/locale/zh_CN.mjs';
import '../_chunks/dep-6b4aa943.mjs';
import '../_chunks/dep-d52291a9.mjs';
import '../checkbox/props.mjs';
import '../checkbox/constants.mjs';
import '../_chunks/dep-c4e1a112.mjs';
import '../_chunks/dep-44417261.mjs';
import '../config-provider/type.mjs';
import '../utils/render-tnode.mjs';
import '../checkbox/group.mjs';
import '../_chunks/dep-0492e83e.mjs';
import '../hooks/slot.mjs';
import '../checkbox/checkbox-group-props.mjs';
import '../checkbox/style/css.mjs';
import '../checkbox/type.mjs';
import '../loading/index.mjs';
import '../loading/directive.mjs';
import '../loading/plugin.mjs';
import '../utils/dom.mjs';
import '../utils/easing.mjs';
import '../loading/loading.mjs';
import '../hooks/useTeleport.mjs';
import '../loading/props.mjs';
import '../loading/icon/gradient.mjs';
import '../_common/js/loading/circle-adapter.mjs';
import '../_common/js/utils/set-style.mjs';
import '../_common/js/utils/helper.mjs';
import '../_chunks/dep-b6a73f93.mjs';
import '../loading/style/css.mjs';
import '../loading/type.mjs';
import '../hooks/useGlobalIcon.mjs';
import '../tree/util.mjs';
import '../tree/hooks/useDraggable.mjs';
import '../_chunks/dep-b069d97f.mjs';
import '../_chunks/dep-96bb54d5.mjs';
import '../_chunks/dep-6205fc47.mjs';
import '../tree/hooks/useOnDrag.mjs';
import '../tree/hooks/useExposeFunc.mjs';
import '../tree/style/css.mjs';
import '../tree/type.mjs';
import '../select-input/select-input.mjs';
import '../popup/index.mjs';
import '../popup/popup.mjs';
import '@popperjs/core';
import '../hooks/index.mjs';
import '../hooks/icon.mjs';
import '../hooks/useCommonClassName.mjs';
import '../hooks/useDestroyOnClose.mjs';
import '../hooks/useVirtualScroll.mjs';
import '../popup/container.mjs';
import '../hooks/useResizeObserver.mjs';
import '../popup/props.mjs';
import '../popup/style/css.mjs';
import '../popup/type.mjs';
import '../select-input/props.mjs';
import '../select-input/useSingle.mjs';
import '../input/index.mjs';
import '../input/input.mjs';
import '../input/props.mjs';
import '../input/useInput.mjs';
import '../form/const.mjs';
import '../input/useLengthLimit.mjs';
import '../input/useInputEventHandler.mjs';
import '../input/useInputWidth.mjs';
import '../input/input-group.mjs';
import '../input/input-group-props.mjs';
import '../input/style/css.mjs';
import '../input/type.mjs';
import '../select-input/useMultiple.mjs';
import '../tag-input/index.mjs';
import '../tag-input/tag-input.mjs';
import '../tag-input/props.mjs';
import '../tag-input/hooks/useTagScroll.mjs';
import '../tag-input/useTagList.mjs';
import '../tag/index.mjs';
import '../tag/tag.mjs';
import '../tag/props.mjs';
import '../tag/check-tag.mjs';
import '../tag/check-tag-props.mjs';
import '../tag/style/css.mjs';
import '../tag/type.mjs';
import '../tag-input/hooks/useHover.mjs';
import '../tag-input/hooks/useDragSorter.mjs';
import '../tag-input/style/css.mjs';
import '../tag-input/type.mjs';
import '../select-input/useOverlayInnerStyle.mjs';
import '../select-input/style/css.mjs';
import '../select-input/type.mjs';

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
var _TreeSelect = defineComponent({
  name: "TTreeSelect",
  props: props,
  setup: function setup(props2, _ref) {
    var slots = _ref.slots;
    var renderTNodeJSX = useTNodeJSX();
    var renderDefaultTNode = useTNodeDefault();
    var classPrefix = usePrefixClass();
    var _useConfig = useConfig("treeSelect"),
      globalConfig = _useConfig.globalConfig;
    var formDisabled = useFormDisabled();
    var treeRef = ref(null);
    var filterByText = ref(null);
    var actived = ref([]);
    var expanded = ref([]);
    var nodeInfo = ref(null);
    var treeKey = ref(0);
    var _toRefs = toRefs(props2),
      value = _toRefs.value,
      modelValue = _toRefs.modelValue,
      popupVisible = _toRefs.popupVisible,
      inputValue = _toRefs.inputValue;
    var _useVModel = useVModel(value, modelValue, props2.defaultValue, props2.onChange),
      _useVModel2 = _slicedToArray(_useVModel, 2),
      treeSelectValue = _useVModel2[0],
      setTreeSelectValue = _useVModel2[1];
    var _useDefaultValue = useDefaultValue(popupVisible, false, props2.onPopupVisibleChange, "popupVisible"),
      _useDefaultValue2 = _slicedToArray(_useDefaultValue, 2),
      innerVisible = _useDefaultValue2[0],
      setInnerVisible = _useDefaultValue2[1];
    var _useDefaultValue3 = useDefaultValue(inputValue, props2.defaultInputValue, props2.onInputChange, "inputValue"),
      _useDefaultValue4 = _slicedToArray(_useDefaultValue3, 2),
      innerInputValue = _useDefaultValue4[0],
      setInnerInputValue = _useDefaultValue4[1];
    watch(treeSelectValue, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
      return regenerator.wrap(function _callee$(_context) {
        while (1) switch (_context.prev = _context.next) {
          case 0:
            _context.next = 2;
            return changeNodeInfo();
          case 2:
            if (!props2.multiple) actived.value = nodeInfo.value ? [nodeInfo.value.value] : [];
          case 3:
          case "end":
            return _context.stop();
        }
      }, _callee);
    })));
    watch(function () {
      return props2.data;
    }, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
      return regenerator.wrap(function _callee2$(_context2) {
        while (1) switch (_context2.prev = _context2.next) {
          case 0:
            _context2.next = 2;
            return changeNodeInfo();
          case 2:
            treeRerender();
          case 3:
          case "end":
            return _context2.stop();
        }
      }, _callee2);
    })), {
      deep: true
    });
    var tDisabled = computed(function () {
      return formDisabled.value || props2.disabled;
    });
    var inputPlaceholder = computed(function () {
      var _nodeInfo$value;
      return innerVisible.value && ((_nodeInfo$value = nodeInfo.value) === null || _nodeInfo$value === void 0 ? void 0 : _nodeInfo$value.label) || props2.placeholder || globalConfig.value.placeholder;
    });
    var popupClass = computed(function () {
      return ["".concat(classPrefix.value, "-select__dropdown"), "narrow-scrollbar"];
    });
    var dropdownInnerSize = computed(function () {
      return {
        small: "s",
        medium: "m",
        large: "l"
      }[props2.size];
    });
    var isObjectValue = computed(function () {
      return props2.valueType === "object";
    });
    var checked = computed(function () {
      if (props2.multiple) {
        if (isObjectValue.value) {
          return isArray_1(treeSelectValue.value) ? treeSelectValue.value.map(function (item) {
            return item.value;
          }) : [];
        }
        return isArray_1(treeSelectValue.value) ? treeSelectValue.value.map(function (item) {
          return item;
        }) : [];
      }
      return [];
    });
    var multiLimitDisabled = computed(function () {
      return props2.multiple && !!props2.max && isArray_1(treeSelectValue.value) && props2.max <= treeSelectValue.value.length;
    });
    var realLabel = computed(function () {
      if (!isEmpty_1(props2.treeProps) && !isEmpty_1(props2.treeProps.keys)) return props2.treeProps.keys.label || "label";
      return "label";
    });
    var realValue = computed(function () {
      if (!isEmpty_1(props2.treeProps) && !isEmpty_1(props2.treeProps.keys)) return props2.treeProps.keys.value || "value";
      return "value";
    });
    var realChildren = computed(function () {
      if (!isEmpty_1(props2.treeProps) && !isEmpty_1(props2.treeProps.keys)) return props2.treeProps.keys.children || "children";
      return "children";
    });
    onMounted( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee3() {
      return regenerator.wrap(function _callee3$(_context3) {
        while (1) switch (_context3.prev = _context3.next) {
          case 0:
            if (!(!treeSelectValue.value && props2.defaultValue)) {
              _context3.next = 3;
              break;
            }
            _context3.next = 3;
            return change(props2.defaultValue, null, "uncheck");
          case 3:
            if (isObjectValue.value) {
              actived.value = isArray_1(treeSelectValue.value) ? treeSelectValue.value.map(function (item) {
                return item.value;
              }) : [treeSelectValue.value.value];
            } else {
              actived.value = isArray_1(treeSelectValue.value) ? treeSelectValue.value : [treeSelectValue.value];
            }
            changeNodeInfo();
          case 5:
          case "end":
            return _context3.stop();
        }
      }, _callee3);
    })));
    var change = function change(valueParam, node, trigger) {
      setTreeSelectValue(valueParam, {
        node: node,
        trigger: trigger
      });
      changeNodeInfo();
    };
    var clear = function clear(content) {
      var _props2$onClear;
      var defaultValue = props2.multiple ? [] : "";
      actived.value = [];
      change(defaultValue, null, "clear");
      (_props2$onClear = props2.onClear) === null || _props2$onClear === void 0 ? void 0 : _props2$onClear.call(props2, {
        e: content.e
      });
    };
    var treeNodeChange = function treeNodeChange(valueParam, context) {
      var current = valueParam;
      if (isObjectValue.value) current = valueParam.map(function (nodeValue) {
        return getTreeNode(props2.data, nodeValue);
      });
      change(current, context.node, "check");
    };
    var treeNodeActive = function treeNodeActive(valueParam, context) {
      if (!props2.multiple) setInnerVisible(false, context);
      if (props2.multiple) return;
      if (treeSelectValue.value === context.node.data[realValue.value]) return;
      var current = valueParam;
      if (isObjectValue.value) {
        var nodeValue = isEmpty_1(valueParam) ? "" : valueParam[0];
        current = getTreeNode(props2.data, nodeValue);
      } else {
        current = isEmpty_1(valueParam) ? "" : valueParam[0];
      }
      change(current, context.node, "check");
      actived.value = valueParam;
    };
    var treeNodeExpand = function treeNodeExpand(valueParam) {
      expanded.value = valueParam;
    };
    var treeNodeLoad = function treeNodeLoad() {
      changeNodeInfo();
    };
    var inputChange = function inputChange(value2) {
      var _props2$onSearch2;
      if (!innerVisible.value) {
        var _props2$onSearch;
        (_props2$onSearch = props2.onSearch) === null || _props2$onSearch === void 0 ? void 0 : _props2$onSearch.call(props2, String(value2));
        return;
      }
      setInnerInputValue(value2);
      if (!value2) {
        filterByText.value = null;
        return null;
      }
      filterByText.value = function (node) {
        if (isFunction_1(props2.filter)) {
          var filter = props2.filter(String(value2), node);
          if (isBoolean_1(filter)) return filter;
        }
        return node.data[realLabel.value].includes(value2);
      };
      (_props2$onSearch2 = props2.onSearch) === null || _props2$onSearch2 === void 0 ? void 0 : _props2$onSearch2.call(props2, String(value2));
    };
    var tagChange = function tagChange(value2, context) {
      var _props2$onRemove;
      var trigger = context.trigger,
        index = context.index;
      if (["tag-remove", "backspace"].includes(trigger)) isArray_1(treeSelectValue.value) && treeSelectValue.value.splice(index, 1);
      (_props2$onRemove = props2.onRemove) === null || _props2$onRemove === void 0 ? void 0 : _props2$onRemove.call(props2, {
        value: value2,
        data: null,
        e: context && context.e
      });
      change(treeSelectValue.value, null, trigger);
    };
    var changeNodeInfo = /*#__PURE__*/function () {
      var _ref5 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee4() {
        return regenerator.wrap(function _callee4$(_context4) {
          while (1) switch (_context4.prev = _context4.next) {
            case 0:
              _context4.next = 2;
              return treeSelectValue.value;
            case 2:
              if (!props2.multiple) {
                if (treeSelectValue.value || treeSelectValue.value === 0) nodeInfo.value = getSingleNodeInfo();else nodeInfo.value = "";
              } else if (props2.multiple) {
                if (isArray_1(treeSelectValue.value)) nodeInfo.value = getMultipleNodeInfo();else nodeInfo.value = [];
              } else {
                nodeInfo.value = null;
              }
            case 3:
            case "end":
              return _context4.stop();
          }
        }, _callee4);
      }));
      return function changeNodeInfo() {
        return _ref5.apply(this, arguments);
      };
    }();
    var getSingleNodeInfo = function getSingleNodeInfo() {
      var _props2$treeProps;
      var nodeValue = isObjectValue.value ? treeSelectValue.value.value : treeSelectValue.value;
      if (treeRef.value && (_props2$treeProps = props2.treeProps) !== null && _props2$treeProps !== void 0 && _props2$treeProps.load) {
        if (!isEmpty_1(props2.data)) {
          var node2 = treeRef.value.getItem(nodeValue);
          if (node2) return {
            label: node2.data[realLabel.value],
            value: node2.data[realValue.value]
          };
        }
        return {
          label: nodeValue,
          value: nodeValue
        };
      }
      var node = getTreeNode(props2.data, nodeValue);
      if (!node) return {
        label: nodeValue,
        value: nodeValue
      };
      return node;
    };
    var getMultipleNodeInfo = function getMultipleNodeInfo() {
      return treeSelectValue.value.map(function (value2) {
        var _props2$treeProps2;
        var nodeValue = isObjectValue.value ? value2.value : value2;
        if (treeRef.value && (_props2$treeProps2 = props2.treeProps) !== null && _props2$treeProps2 !== void 0 && _props2$treeProps2.load) {
          if (!isEmpty_1(props2.data)) {
            var node2 = treeRef.value.getItem(nodeValue);
            if (node2) return {
              label: node2.data[realLabel.value],
              value: node2.data[realValue.value]
            };
          }
          return {
            label: nodeValue,
            value: nodeValue
          };
        }
        var node = getTreeNode(props2.data, nodeValue);
        if (!node) return {
          label: nodeValue,
          value: nodeValue
        };
        return node;
      });
    };
    var getTreeNode = function getTreeNode(data, targetValue) {
      for (var i = 0, len = data.length; i < len; i++) {
        var _data$i;
        if (data[i][realValue.value] === targetValue) return {
          label: data[i][realLabel.value],
          value: data[i][realValue.value]
        };
        if ((_data$i = data[i]) !== null && _data$i !== void 0 && _data$i[realChildren.value]) {
          var _data$i2;
          var result = getTreeNode((_data$i2 = data[i]) === null || _data$i2 === void 0 ? void 0 : _data$i2[realChildren.value], targetValue);
          if (!isNil_1(result)) return result;
        }
      }
      return null;
    };
    var treeRerender = function treeRerender() {
      treeKey.value += 1;
    };
    var renderTree = function renderTree() {
      return withDirectives(createVNode(Tree, mergeProps({
        "ref": treeRef,
        "key": treeKey.value,
        "value": _toConsumableArray(checked.value),
        "hover": true,
        "data": props2.data,
        "activable": !props2.multiple,
        "checkable": props2.multiple,
        "disabled": tDisabled.value || multiLimitDisabled.value,
        "size": props2.size,
        "filter": filterByText.value,
        "icon": !filterByText.value,
        "actived": actived.value,
        "expanded": expanded.value,
        "activeMultiple": props2.multiple,
        "onChange": treeNodeChange,
        "onActive": treeNodeActive,
        "onExpand": treeNodeExpand,
        "onLoad": treeNodeLoad,
        "expandOnClickNode": true
      }, props2.treeProps), {
        empty: function empty() {
          return renderDefaultTNode("empty", {
            defaultNode: createVNode("div", {
              "class": "".concat(classPrefix.value, "-select__empty")
            }, [globalConfig.value.empty])
          });
        }
      }), [[vShow, !props2.loading]]);
    };
    var renderSuffixIcon = function renderSuffixIcon() {
      var _ref6;
      return createVNode(FakeArrow, {
        "isActive": innerVisible.value,
        "disabled": props2.disabled,
        "overlayClassName": (_ref6 = {}, _defineProperty(_ref6, "".concat(classPrefix.value, "-fake-arrow--highlight"), innerVisible.value), _defineProperty(_ref6, "".concat(classPrefix.value, "-fake-arrow--disable"), props2.disabled), _ref6)
      }, null);
    };
    return function () {
      return createVNode(SelectInput, mergeProps({
        "class": "".concat(classPrefix.value, "-tree-select"),
        "value": nodeInfo.value,
        "inputValue": innerVisible.value ? innerInputValue.value : "",
        "popupVisible": innerVisible.value,
        "disabled": tDisabled.value,
        "multiple": props2.multiple,
        "loading": props2.loading,
        "clearable": props2.clearable,
        "autoWidth": props2.autoWidth,
        "borderless": props2.borderless,
        "readonly": props2.readonly,
        "placeholder": inputPlaceholder.value,
        "allowInput": props2.filterable || isFunction_1(props2.filter),
        "minCollapsedNum": props2.minCollapsedNum,
        "collapsed-items": props2.collapsedItems,
        "popupProps": _objectSpread({
          overlayClassName: popupClass.value
        }, props2.popupProps),
        "inputProps": _objectSpread({
          size: props2.size
        }, props2.inputProps),
        "tagInputProps": {
          size: props2.size
        },
        "tagProps": _objectSpread({
          maxWidth: 300
        }, props2.tagProps),
        "label": function label() {
          return renderTNodeJSX("prefixIcon");
        },
        "suffixIcon": function suffixIcon() {
          return renderSuffixIcon();
        },
        "onClear": clear,
        "onBlur": function onBlur(_, context) {
          var _props2$onBlur;
          (_props2$onBlur = props2.onBlur) === null || _props2$onBlur === void 0 ? void 0 : _props2$onBlur.call(props2, {
            value: treeSelectValue.value,
            e: context.e
          });
        },
        "onFocus": function onFocus(_, context) {
          var _props2$onFocus;
          (_props2$onFocus = props2.onFocus) === null || _props2$onFocus === void 0 ? void 0 : _props2$onFocus.call(props2, {
            value: treeSelectValue.value,
            e: context.e
          });
        },
        "valueDisplay": function valueDisplay() {
          var _ref7;
          return renderTNodeJSX("valueDisplay", {
            params: props2.multiple ? {
              value: nodeInfo.value,
              onClose: function onClose(value2, context) {
                tagChange(value2, context);
              }
            } : {
              value: nodeInfo.value || (_ref7 = {}, _defineProperty(_ref7, realLabel.value, ""), _defineProperty(_ref7, realValue.value, void 0), _ref7)
            }
          });
        },
        "onInputChange": inputChange,
        "onTagChange": tagChange,
        "onPopupVisibleChange": function onPopupVisibleChange(state, context) {
          return setInnerVisible(state, context);
        }
      }, props2.selectInputProps), {
        panel: function panel() {
          return createVNode("div", {
            "class": ["".concat(classPrefix.value, "-select__dropdown-inner"), "".concat(classPrefix.value, "-select__dropdown-inner--size-").concat(dropdownInnerSize.value)]
          }, [withDirectives(createVNode("p", {
            "class": ["".concat(classPrefix.value, "-select-loading-tips"), "".concat(classPrefix.value, "-select__right-icon-polyfill")]
          }, [renderDefaultTNode("loadingText", {
            defaultNode: createVNode("div", {
              "class": "".concat(classPrefix.value, "-select__empty")
            }, [globalConfig.value.loadingText])
          })]), [[vShow, props2.loading && !tDisabled.value]]), renderTree()]);
        },
        collapsedItems: slots.collapsedItems
      });
    };
  }
});

export { _TreeSelect as default };
//# sourceMappingURL=tree-select.mjs.map
