/**
 * tdesign v0.41.7
 * (c) 2022 tdesign
 * @license MIT
 */

import { h as helper } from '../_chunks/dep-37d5b9c4.js';
import _defineProperty from '@babel/runtime/helpers/defineProperty';
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
import _regeneratorRuntime from '@babel/runtime/regenerator';
import isArray from 'lodash/isArray';
import isEmpty from 'lodash/isEmpty';
import isNumber from 'lodash/isNumber';
import isString from 'lodash/isString';
import isBoolean from 'lodash/isBoolean';
import isObject from 'lodash/isObject';
import isFunction from 'lodash/isFunction';
import isNil from 'lodash/isNil';
import { CloseCircleFilledIcon } from 'tdesign-icons-vue';
import { Loading } from '../loading/index.js';
import mixins from '../utils/mixins.js';
import getConfigReceiverMixins from '../config-provider/config-receiver.js';
import { renderTNodeJSX } from '../utils/render-tnode.js';
import { emitEvent } from '../utils/event.js';
import { Popup } from '../popup/index.js';
import { Tag } from '../tag/index.js';
import { Tree } from '../tree/index.js';
import { Input } from '../input/index.js';
import FakeArrow from '../common-components/fake-arrow.js';
import ClASSNAMES from '../utils/classnames.js';
import props from './props.js';
import { prefix } from '../config.js';
import '../loading/loading.js';
import 'vue';
import '../loading/icon/gradient.js';
import '../_common/js/loading/circle-adapter.js';
import '../_common/js/utils/set-style.js';
import '../_common/js/utils/helper.js';
import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/slicedToArray';
import '../utils/dom.js';
import 'raf';
import '../utils/easing.js';
import '../utils/transfer-dom.js';
import '../loading/props.js';
import '../utils/withInstall.js';
import 'lodash/capitalize';
import './style/index.js';
import '../loading/type.js';
import '../loading/plugin.js';
import '@babel/runtime/helpers/typeof';
import 'lodash/mergeWith';
import '../config-provider/context.js';
import 'lodash/merge';
import '../_common/js/global-config/default-config.js';
import '../_common/js/global-config/locale/zh_CN.js';
import '../config-provider/type.js';
import '../utils/helper.js';
import 'lodash/camelCase';
import '../popup/popup.js';
import '@popperjs/core';
import '../popup/props.js';
import '../popup/container.js';
import '../utils/map-props.js';
import '../popup/type.js';
import '../tag/tag.js';
import '../tag/props.js';
import '../tag/check-tag.js';
import '../tag/check-tag-props.js';
import '../tag/type.js';
import '../tree/td-tree.js';
import 'lodash/upperFirst';
import 'lodash/pick';
import '../_common/js/tree/tree-store.js';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import 'lodash/difference';
import 'lodash/isPlainObject';
import '../_common/js/tree/tree-node.js';
import '@babel/runtime/helpers/toConsumableArray';
import 'lodash/uniqueId';
import 'lodash/get';
import '../_common/js/tree/tree-node-model.js';
import '../_common/js/log/log.js';
import '../tree/tree-item.js';
import '../checkbox/index.js';
import '../checkbox/group.js';
import 'lodash/intersection';
import '../checkbox/checkbox.js';
import '../checkbox/props.js';
import '../checkbox/checkbox-group-props.js';
import '../checkbox/type.js';
import '../tree/util.js';
import '../tree/constants.js';
import '../utils/ripple.js';
import '../tree/props.js';
import '../tree/interface.js';
import '../tree/type.js';
import '../input/addon.js';
import '../input/input.js';
import 'lodash/kebabCase';
import '../input/props.js';
import '../input/input-group.js';
import '../input/type.js';

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 = mixins(getConfigReceiverMixins("treeSelect")).extend({
  name: "TTreeSelect",
  model: {
    prop: "value",
    event: "change"
  },
  props: props,
  data: function data() {
    return {
      formDisabled: void 0,
      visible: false,
      isHover: false,
      focusing: false,
      defaultProps: {
        trigger: "click",
        placement: "bottom-left",
        overlayClassName: "",
        overlayStyle: function overlayStyle(trigger) {
          return {
            width: "".concat(trigger.offsetWidth, "px")
          };
        }
      },
      filterText: "",
      filterByText: null,
      actived: [],
      expanded: [],
      nodeInfo: null,
      treeKey: 0
    };
  },
  watch: {
    value: function value() {
      var _this = this;

      return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
        return _regeneratorRuntime.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                _context.next = 2;
                return _this.changeNodeInfo();

              case 2:
                if (!_this.multiple) {
                  _this.actived = _this.nodeInfo ? [_this.nodeInfo.value] : [];
                }

              case 3:
              case "end":
                return _context.stop();
            }
          }
        }, _callee);
      }))();
    },
    data: function data() {
      var _this2 = this;

      return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
        return _regeneratorRuntime.wrap(function _callee2$(_context2) {
          while (1) {
            switch (_context2.prev = _context2.next) {
              case 0:
                _context2.next = 2;
                return _this2.changeNodeInfo();

              case 2:
                _this2.treeRerender();

              case 3:
              case "end":
                return _context2.stop();
            }
          }
        }, _callee2);
      }))();
    }
  },
  computed: {
    tDisabled: function tDisabled() {
      return this.formDisabled || this.disabled;
    },
    classes: function classes() {
      var _ref;

      return ["".concat(prefix, "-select"), "".concat(prefix, "-select-polyfill"), (_ref = {}, _defineProperty(_ref, ClASSNAMES.STATUS.disabled, this.tDisabled), _defineProperty(_ref, ClASSNAMES.STATUS.active, this.visible), _defineProperty(_ref, ClASSNAMES.SIZE[this.size], this.size), _defineProperty(_ref, "".concat(prefix, "-has-prefix"), this.prefixIconSlot), _defineProperty(_ref, "".concat(prefix, "-select-selected"), this.selectedSingle || !isEmpty(this.selectedMultiple)), _ref)];
    },
    popupClass: function popupClass() {
      var popupObject = this.popupObject;
      return "".concat(popupObject.overlayClassName, " ").concat(prefix, "-select__dropdown narrow-scrollbar");
    },
    isObjectValue: function isObjectValue() {
      return this.valueType === "object";
    },
    checked: function checked() {
      if (this.multiple) {
        if (this.isObjectValue) {
          return isArray(this.value) ? this.value.map(function (item) {
            return item.value;
          }) : [];
        }

        return isArray(this.value) ? this.value : [];
      }

      return [];
    },
    showArrow: function showArrow() {
      return !this.clearable || !this.isHover || this.tDisabled || !this.multiple && !this.value && this.value !== 0 || this.multiple && isArray(this.value) && isEmpty(this.value);
    },
    showLoading: function showLoading() {
      return this.loading && !this.tDisabled;
    },
    showClose: function showClose() {
      return this.clearable && this.isHover && !this.tDisabled && (!this.multiple && (!!this.value || this.value === 0) || this.multiple && !isEmpty(this.value));
    },
    showPlaceholder: function showPlaceholder() {
      if (!this.showFilter && (isString(this.value) && this.value === "" && !this.selectedSingle || isArray(this.value) && isEmpty(this.value) || isNil(this.value))) {
        return true;
      }

      return false;
    },
    showFilter: function showFilter() {
      if (this.tDisabled) {
        return false;
      }

      if (!this.multiple && this.selectedSingle && (this.filterable || isFunction(this.filter))) {
        return this.visible;
      }

      return this.filterable || isFunction(this.filter);
    },
    showTree: function showTree() {
      return !this.loading;
    },
    popupObject: function popupObject() {
      var propsObject = this.popupProps ? _objectSpread(_objectSpread({}, this.defaultProps), this.popupProps) : this.defaultProps;
      return propsObject;
    },
    selectedSingle: function selectedSingle() {
      if (!this.multiple && (isString(this.value) || isNumber(this.value) || isObject(this.value))) {
        if (this.nodeInfo) {
          return this.nodeInfo.label;
        }

        return "".concat(this.value);
      }

      return "";
    },
    selectedMultiple: function selectedMultiple() {
      if (this.multiple && isArray(this.value) && !isEmpty(this.value)) {
        return this.value;
      }

      return [];
    },
    multiLimitDisabled: function multiLimitDisabled() {
      if (this.multiple && this.max && isArray(this.value) && this.max <= this.value.length) {
        return true;
      }

      return false;
    },
    filterPlaceholder: function filterPlaceholder() {
      if (this.multiple && isArray(this.value) && !isEmpty(this.value)) {
        return "";
      }

      var single = this.selectedSingle instanceof Array ? this.selectedSingle[0] : this.selectedSingle;

      if (!this.multiple && single) {
        return single;
      }

      return this.placeholder;
    },
    loadingTextSlot: function loadingTextSlot() {
      var h = this.$createElement;
      var useLocale = !this.loadingText && !this.$scopedSlots.loadingText;
      return useLocale ? h("div", {
        "class": "".concat(prefix, "-select__empty")
      }, [this.t(this.global.loadingText)]) : renderTNodeJSX(this, "loadingText");
    },
    emptySlot: function emptySlot() {
      var h = this.$createElement;
      var useLocale = !this.empty && !this.$scopedSlots.empty;
      return useLocale ? h("div", {
        "class": "".concat(prefix, "-select__empty")
      }, [this.t(this.global.empty)]) : renderTNodeJSX(this, "empty");
    },
    prefixIconSlot: function prefixIconSlot() {
      return renderTNodeJSX(this, "prefixIcon");
    },
    realLabel: function realLabel() {
      var treeProps = this.treeProps;

      if (!isEmpty(treeProps) && !isEmpty(treeProps.keys)) {
        return treeProps.keys.label || "label";
      }

      return "label";
    },
    realValue: function realValue() {
      var treeProps = this.treeProps;

      if (!isEmpty(treeProps) && !isEmpty(treeProps.keys)) {
        return treeProps.keys.value || "value";
      }

      return "value";
    },
    realChildren: function realChildren() {
      var _treeProps$keys;

      var treeProps = this.treeProps;
      return (treeProps === null || treeProps === void 0 ? void 0 : (_treeProps$keys = treeProps.keys) === null || _treeProps$keys === void 0 ? void 0 : _treeProps$keys.children) || "children";
    },
    tagList: function tagList() {
      if (this.nodeInfo && isArray(this.nodeInfo)) {
        return this.nodeInfo.map(function (node) {
          return node.label;
        });
      }

      return this.selectedMultiple;
    }
  },
  mounted: function mounted() {
    var _this3 = this;

    return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
      return _regeneratorRuntime.wrap(function _callee3$(_context3) {
        while (1) {
          switch (_context3.prev = _context3.next) {
            case 0:
              if (!(!_this3.value && _this3.defaultValue)) {
                _context3.next = 3;
                break;
              }

              _context3.next = 3;
              return _this3.change(_this3.defaultValue, null);

            case 3:
              if (_this3.isObjectValue) {
                _this3.actived = isArray(_this3.value) ? _this3.value.map(function (item) {
                  return item.value;
                }) : [_this3.value.value];
              } else {
                _this3.actived = isArray(_this3.value) ? _this3.value : [_this3.value];
              }

              _this3.changeNodeInfo();

            case 5:
            case "end":
              return _context3.stop();
          }
        }
      }, _callee3);
    }))();
  },
  methods: {
    popupVisibleChange: function popupVisibleChange(visible) {
      var _this4 = this;

      return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
        var searchInput;
        return _regeneratorRuntime.wrap(function _callee4$(_context4) {
          while (1) {
            switch (_context4.prev = _context4.next) {
              case 0:
                _context4.next = 2;
                return _this4.visible = visible;

              case 2:
                if (_this4.showFilter && _this4.visible) {
                  searchInput = _this4.$refs.input;
                  searchInput === null || searchInput === void 0 ? void 0 : searchInput.focus();
                  _this4.focusing = true;
                }

              case 3:
              case "end":
                return _context4.stop();
            }
          }
        }, _callee4);
      }))();
    },
    removeTag: function removeTag(index, data, e) {
      if (this.tDisabled) {
        return;
      }

      this.remove({
        value: this.value[index],
        data: data,
        e: e
      });
      isArray(this.value) && this.value.splice(index, 1);
      this.change(this.value, null);
    },
    change: function change(value, node) {
      emitEvent(this, "change", value, {
        node: node
      });
      this.changeNodeInfo();
    },
    clear: function clear(e) {
      var defaultValue = this.multiple ? [] : "";
      this.change(defaultValue, null);
      this.actived = [];
      this.filterText = "";
      this.filterByText = null;
      emitEvent(this, "clear", {
        e: e
      });
    },
    focus: function focus(ctx) {
      this.focusing = true;
      emitEvent(this, "focus", _objectSpread({
        value: this.value
      }, ctx));
    },
    blur: function blur(ctx) {
      this.focusing = false;
      this.filterText = "";
      this.filterByText = null;
      emitEvent(this, "blur", _objectSpread({
        value: this.value
      }, ctx));
    },
    remove: function remove(options) {
      emitEvent(this, "remove", options);
    },
    search: function search(filterWords) {
      emitEvent(this, "search", filterWords);
    },
    treeNodeChange: function treeNodeChange(value, context) {
      var _this5 = this;

      var current = value;

      if (this.isObjectValue) {
        current = value.map(function (nodeValue) {
          return _this5.getTreeNode(_this5.data, nodeValue);
        });
      }

      this.change(current, context.node);
      this.actived = value;
    },
    treeNodeActive: function treeNodeActive(value, context) {
      if (this.multiple) {
        return;
      }

      var triggerValue = this.isObjectValue ? context.node.data : context.node.data[this.realValue];
      this.change(triggerValue, context.node);
      this.actived = [triggerValue];
      this.visible = false;
    },
    treeNodeExpand: function treeNodeExpand(value) {
      this.expanded = value;
    },
    onInputChange: function onInputChange() {
      var _this6 = this;

      if (!this.filterText) {
        this.filterByText = null;
        return null;
      }

      this.filterByText = function (node) {
        if (isFunction(_this6.filter)) {
          var filter = _this6.filter(_this6.filterText, node);

          if (isBoolean(filter)) {
            return filter;
          }
        }

        return node.data[_this6.realLabel].indexOf(_this6.filterText) >= 0;
      };

      this.search(this.filterText);
    },
    getTreeData: function getTreeData() {
      var _this$$refs$tree,
          _this7 = this;

      return (((_this$$refs$tree = this.$refs.tree) === null || _this$$refs$tree === void 0 ? void 0 : _this$$refs$tree.getItems()) || []).map(function (item) {
        var _ref2;

        return _ref2 = {}, _defineProperty(_ref2, _this7.realLabel, item.data[_this7.realLabel]), _defineProperty(_ref2, _this7.realValue, item.data[_this7.realValue]), _ref2;
      });
    },
    changeNodeInfo: function changeNodeInfo() {
      var _this8 = this;

      return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
        return _regeneratorRuntime.wrap(function _callee5$(_context5) {
          while (1) {
            switch (_context5.prev = _context5.next) {
              case 0:
                _context5.next = 2;
                return _this8.value;

              case 2:
                if (!_this8.multiple && (_this8.value || _this8.value === 0)) {
                  _this8.changeSingleNodeInfo();
                } else if (_this8.multiple && isArray(_this8.value)) {
                  _this8.changeMultipleNodeInfo();
                } else {
                  _this8.nodeInfo = null;
                }

              case 3:
              case "end":
                return _context5.stop();
            }
          }
        }, _callee5);
      }))();
    },
    changeSingleNodeInfo: function changeSingleNodeInfo() {
      var _this$treeProps;

      var tree = this.$refs.tree;
      var nodeValue = this.isObjectValue ? this.value.value : this.value;

      if (tree && (_this$treeProps = this.treeProps) !== null && _this$treeProps !== void 0 && _this$treeProps.load) {
        if (!isEmpty(this.data)) {
          var node = tree.getItem(nodeValue);
          if (!node) return;
          this.nodeInfo = {
            label: node.data[this.realLabel],
            value: node.data[this.realValue]
          };
        } else {
          this.nodeInfo = {
            label: nodeValue,
            value: nodeValue
          };
        }
      } else {
        var _node = this.getTreeNode(this.data, nodeValue);

        if (!_node) {
          this.nodeInfo = {
            label: nodeValue,
            value: nodeValue
          };
        } else {
          this.nodeInfo = _node;
        }
      }
    },
    changeMultipleNodeInfo: function changeMultipleNodeInfo() {
      var _this9 = this;

      var tree = this.$refs.tree;
      this.nodeInfo = this.value.map(function (value) {
        var _this9$treeProps;

        var nodeValue = _this9.isObjectValue ? value.value : value;

        if (tree && (_this9$treeProps = _this9.treeProps) !== null && _this9$treeProps !== void 0 && _this9$treeProps.load) {
          if (!isEmpty(_this9.data)) {
            var node2 = tree.getItem(nodeValue);
            if (!node2) return;
            return {
              label: node2.data[_this9.realLabel],
              value: node2.data[_this9.realValue]
            };
          }

          return {
            label: nodeValue,
            value: nodeValue
          };
        }

        var node = _this9.getTreeNode(_this9.data, nodeValue);

        if (!node) {
          return {
            label: nodeValue,
            value: nodeValue
          };
        }

        return node;
      });
    },
    getTreeNode: function getTreeNode(data, targetValue) {
      for (var i = 0, len = data.length; i < len; i++) {
        if (data[i][this.realValue] === targetValue) {
          return {
            label: data[i][this.realLabel],
            value: data[i][this.realValue]
          };
        }

        var childrenData = data[i][this.realChildren];

        if (childrenData) {
          var data2 = Array.isArray(childrenData) ? childrenData : this.getTreeData();
          var result = this.getTreeNode(data2, targetValue);

          if (!isNil(result)) {
            return result;
          }
        }
      }

      return null;
    },
    treeRerender: function treeRerender() {
      this.treeKey += 1;
    }
  },
  render: function render() {
    var _this10 = this,
        _ref3;

    var h = arguments[0];
    var treeProps = this.treeProps,
        popupObject = this.popupObject,
        classes = this.classes,
        popupClass = this.popupClass,
        treeKey = this.treeKey;
    var iconStyle = {
      "font-size": this.size
    };
    var treeItem = h(Tree, {
      "ref": "tree",
      "directives": [{
        name: "show",
        value: this.showTree
      }],
      "key": treeKey,
      "attrs": {
        "value": this.checked,
        "hover": true,
        "data": this.data,
        "activable": !this.multiple,
        "checkable": this.multiple,
        "disabled": this.tDisabled || this.multiLimitDisabled,
        "empty": this.empty,
        "size": this.size,
        "filter": this.filterByText,
        "actived": this.actived,
        "expanded": this.expanded,
        "activeMultiple": this.multiple,
        "expandOnClickNode": true,
        "checkStrictly": false
      },
      "on": {
        "change": this.treeNodeChange,
        "active": this.treeNodeActive,
        "expand": this.treeNodeExpand
      },
      "props": _objectSpread({}, treeProps)
    }, [h("template", {
      "slot": "empty"
    }, [this.emptySlot])]);
    var searchInput = h(Input, {
      "ref": "input",
      "directives": [{
        name: "show",
        value: this.showFilter
      }],
      "class": "".concat(prefix, "-select__input"),
      "attrs": {
        "size": this.size,
        "disabled": this.tDisabled,
        "placeholder": this.filterPlaceholder
      },
      "on": {
        "change": this.onInputChange,
        "blur": function blur(value, context) {
          return _this10.blur(context);
        },
        "focus": function focus(value, context) {
          return _this10.focus(context);
        }
      },
      "model": {
        value: _this10.filterText,
        callback: function callback($$v) {
          _this10.filterText = $$v;
        }
      }
    });
    var tagItem = !isEmpty(this.tagList) && (this.valueDisplay || this.$scopedSlots.valueDisplay) ? renderTNodeJSX(this, "valueDisplay", {
      params: {
        value: this.nodeInfo,
        onClose: function onClose(index) {
          return _this10.removeTag(index, null);
        }
      }
    }) : this.tagList.map(function (label, index) {
      return h(Tag, {
        "directives": [{
          name: "show",
          value: _this10.minCollapsedNum <= 0 || index < _this10.minCollapsedNum
        }],
        "key": index,
        "attrs": {
          "size": _this10.size,
          "closable": !_this10.tDisabled,
          "disabled": _this10.tDisabled,
          "maxWidth": 300,
          "title": label
        },
        "on": {
          "close": function close(e) {
            return _this10.removeTag(index, null, e);
          }
        }
      }, [label]);
    });
    var selectedSingle = this.valueDisplay || this.$scopedSlots.valueDisplay ? renderTNodeJSX(this, "valueDisplay", {
      params: {
        value: this.nodeInfo || (_ref3 = {}, _defineProperty(_ref3, this.realLabel, ""), _defineProperty(_ref3, this.realValue, ""), _ref3)
      }
    }) : h("span", {
      "attrs": {
        "title": this.selectedSingle
      },
      "class": "".concat(prefix, "-select__single")
    }, [this.selectedSingle]);
    var collapsedItem = (this.collapsedItems || this.$scopedSlots.collapsedItems) && this.minCollapsedNum > 0 && this.tagList.length > this.minCollapsedNum ? renderTNodeJSX(this, "collapsedItems", {
      params: {
        count: this.tagList.length - this.minCollapsedNum,
        value: this.selectedMultiple,
        collapsedSelectedItems: this.selectedMultiple.slice(this.minCollapsedNum)
      }
    }) : h(Tag, {
      "directives": [{
        name: "show",
        value: this.minCollapsedNum > 0 && this.tagList.length > this.minCollapsedNum
      }],
      "attrs": {
        "size": this.size
      }
    }, ["+".concat(this.tagList.length - this.minCollapsedNum)]);
    return h("div", {
      "ref": "treeSelect",
      "class": "".concat(prefix, "-select__wrap")
    }, [h(Popup, helper([{
      "ref": "popup",
      "class": "".concat(prefix, "-select__popup-reference"),
      "attrs": {
        "visible": this.visible,
        "disabled": this.tDisabled,
        "placement": popupObject.placement,
        "trigger": popupObject.trigger,
        "overlayStyle": popupObject.overlayStyle,
        "overlayClassName": popupClass
      }
    }, {
      "on": {
        "visible-change": this.popupVisibleChange
      }
    }, {
      "attrs": {
        "expandAnimation": true
      }
    }]), [h("div", {
      "class": classes,
      "on": {
        "mouseenter": function mouseenter() {
          return _this10.isHover = true;
        },
        "mouseleave": function mouseleave() {
          return _this10.isHover = false;
        }
      }
    }, [this.prefixIconSlot && h("span", {
      "class": "".concat(prefix, "-select__left-icon")
    }, [this.prefixIconSlot[0]]), h("span", {
      "directives": [{
        name: "show",
        value: this.showPlaceholder
      }],
      "class": "".concat(prefix, "-select__placeholder")
    }, [this.placeholder || this.global.placeholder]), tagItem, collapsedItem, !this.multiple && !this.showPlaceholder && !this.showFilter && selectedSingle, searchInput, this.showArrow && !this.showLoading && h(FakeArrow, {
      "attrs": {
        "overlayClassName": "".concat(prefix, "-select__right-icon ").concat(prefix, "-select__right-icon-polyfill"),
        "overlayStyle": iconStyle,
        "isActive": this.visible && !this.tDisabled
      }
    }), h(CloseCircleFilledIcon, {
      "directives": [{
        name: "show",
        value: this.showClose && !this.showLoading
      }],
      "class": ["".concat(prefix, "-select__right-icon"), "".concat(prefix, "-select__right-icon-polyfill"), "".concat(prefix, "-select__right-icon-clear")],
      "attrs": {
        "size": this.size
      },
      "nativeOn": {
        "click": this.clear
      }
    }), h(Loading, {
      "directives": [{
        name: "show",
        value: this.showLoading
      }],
      "class": "".concat(prefix, "-select__right-icon ").concat(prefix, "-select__right-icon-polyfill ").concat(prefix, "-select__active-icon"),
      "attrs": {
        "size": "small"
      }
    })]), h("div", {
      "slot": "content"
    }, [h("p", {
      "directives": [{
        name: "show",
        value: this.showLoading
      }],
      "class": "".concat(prefix, "-select__loading-tips ").concat(prefix, "-select__right-icon-polyfill")
    }, [this.loadingTextSlot]), treeItem])])]);
  }
});

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