import '@das-fed/ui/packages/components/select/style.css';
import { withInstall as _e } from "@das-fed/utils/with-install/index";
import { defineComponent as $e, useCssVars as ul, computed as d, ref as n, watch as G, useSlots as il, onMounted as ie, onUnmounted as Ve, watchEffect as de, nextTick as T, resolveComponent as dl, createElementBlock as g, openBlock as c, normalizeStyle as q, normalizeClass as cl, createVNode as y, withDirectives as ce, createCommentVNode as k, createElementVNode as h, unref as r, createBlock as H, mergeProps as me, withModifiers as J, isRef as vl, createSlots as fl, withCtx as f, renderSlot as C, normalizeProps as Q, guardReactiveProps as Y, withKeys as pl, toDisplayString as W, createTextVNode as ve, Fragment as fe } from "vue";
import { Select as ml, Tag as pe } from "ant-design-vue";
import { DasCheckbox as ze } from "@das-fed/ui/packages/components/checkbox/index";
import { vScrollbar as hl } from "@das-fed/ui/packages/components/scrollbar/index";
import { DasTooltip as bl } from "@das-fed/ui/packages/components/tooltip/index";
import { vDasTooltip as Le } from "@das-fed/ui/packages/components/text-tooltip/index";
import { DasInput as gl } from "@das-fed/ui/packages/components/input/index";
import { DasIconXiala as yl } from "@das-fed/ui/packages/icons/xiala/index";
import { DasIconEmpty as Cl } from "@das-fed/ui/packages/icons/empty/index";
import { DasErrorOverlayModel as wl } from "@das-fed/ui/packages/components/error-overlay-model/index";
import { vHoverInside as xl } from "@das-fed/utils/directive";
import { getVarValue as Tl, getVar as Ne, setThemeRule as kl } from "@das-fed/web/packages/theme/index";
import { t as P, currentLang as Il, setI18nRule as Sl } from "@das-fed/web/packages/i18n/index";
import { useZIndex as Vl } from "@das-fed/utils/hooks/popup-manager/use-zindex";
import { useModelValue as zl } from "@das-fed/utils/vue";
import { calcTextWidth as Ll } from "@das-fed/utils/common-tools";
import "ant-design-vue/es/select/style/css";
import "ant-design-vue/es/tag/style/css";
import { SelectOption as Nl } from "ant-design-vue/es";
const _l = { key: 0 }, $l = { class: "das-multiple-option-item" }, Fl = { style: { display: "inline-block" } }, Ml = { key: 0 }, Al = { key: 2 }, Bl = { style: { display: "inline-block" } }, Dl = ["innerHTML"], El = ["innerHTML"], Ol = {
  key: 0,
  class: "das-select-error-label-content das-select-label-content"
}, Wl = { class: "ant-select ant-select-multiple ant-select-selection-overflow-item ant-select-selection-overflow-item-rest" }, Pl = { class: "ant-select-selection-item" }, Rl = { class: "ant-select-selection-item-content" }, ql = ["innerHTML"], Hl = $e({
  inheritAttrs: !1,
  components: {
    VNodes: (I, { attrs: $ }) => $.vnodes
  }
}), Zl = /* @__PURE__ */ $e({
  ...Hl,
  __name: "Select",
  props: {
    modelValue: { default: void 0 },
    options: {},
    mode: { default: "combobox" },
    fieldNames: { default: {} },
    borderType: { default: "underline" },
    placeholder: { default: "" },
    disabled: { type: Boolean, default: !1 },
    isView: { type: Boolean, default: !1 },
    error: { type: Boolean, default: !1 },
    errorLabel: {},
    errorMode: { default: "default" },
    optionFilterProp: { default: "" },
    width: { default: "230px" },
    height: {},
    size: { default: "middle" },
    maxTagTextLength: { default: 10 },
    dropdownClassName: { default: "" },
    isTooltip: { type: Boolean, default: !0 },
    showTooltipLength: { default: 10 },
    open: { type: Boolean, default: void 0 },
    showArrow: { type: Boolean, default: !0 },
    focusOpen: { type: Boolean, default: !0 },
    isRenderNode: { type: Boolean, default: !1 },
    getPopupContainer: { type: Function, default: void 0 },
    noDropdown: { type: Boolean, default: !1 },
    maxTagsLength: { default: 3 },
    noSetDefaultVal: { type: Boolean, default: !1 },
    teleported: { type: Boolean, default: !0 },
    errorModelZIndex: { default: 2e3 },
    isExterControlCount: { type: Boolean, default: !1 },
    dropdownMode: {},
    inputAttrs: {}
  },
  emits: ["update:model-value", "change", "focus", "blur", "dropdownVisibleChange", "addCustomItem"],
  setup(I, { expose: $, emit: F }) {
    ul((e) => ({
      "3e85892a": Pe.value,
      "785ca243": Re.value
    }));
    const l = I, w = F, s = zl(l, "modelValue"), ee = d(() => {
      var e;
      return `<span class='key'>${((e = s.value) == null ? void 0 : e.length) ?? 0}</span>`;
    }), M = n(null), he = n(null), b = n(!1), Z = d(() => l.isView ? l.noSetDefaultVal ? "" : "-" : l.placeholder || P("请选择")), Me = d(() => M.value ? M.value.querySelector(".ant-select-selector") : null), A = n(0), B = n(0), Ae = d(() => l.isTooltip && S.value ? !1 : !l.isTooltip || z.value || !Ie.value || !ae.value), Be = d(() => (Array.isArray(s.value) ? s.value.length : s.value) ? Ie.value : Z.value), be = () => {
      const e = l.size === "table" ? 12 : 14;
      return Ll(Z.value, e);
    }, ge = () => {
      var _;
      const e = M.value.querySelector(".ant-select-selection-placeholder"), t = (_ = x.value) == null ? void 0 : _.$el.querySelectorAll(".ant-select-selection-item");
      t && t.length && t.forEach((X) => X.removeAttribute("title"));
      let o = (e == null ? void 0 : e.offsetWidth) ?? 0;
      if (o === 0) return o;
      const a = window.getComputedStyle(e, null), p = parseFloat(a.paddingRight), v = parseFloat(a.paddingLeft);
      return o - p - v;
    }, S = n(!1);
    G(() => [Z.value, s.value], () => {
      T(() => {
        B.value = ge(), A.value = be(), ((Array.isArray(s.value) ? s.value.length : s.value) || B.value === A.value || A.value - B.value < 1) && (S.value = !1);
      });
    }), G(
      () => {
        var e;
        return (e = he.value) == null ? void 0 : e.$tooltipRef.popperRef.contentRef;
      },
      (e) => {
        e && (e.addEventListener("mouseenter", function() {
          console.log("进入tooltip"), S.value = !0, O.value && clearTimeout(O.value);
        }), e.addEventListener("mouseleave", function() {
          console.log("离开toolTip"), O.value = setTimeout(() => {
            S.value = !1;
          }, 200);
        }));
      }
    );
    const ye = n(null), Ce = d(() => l.dropdownMode ?? l.mode ?? ""), D = n(null), De = n(null), E = n(""), Ee = () => {
      D.value = !0;
    }, Oe = () => {
      D.value = null;
    }, we = () => {
      E.value && (w("addCustomItem", E.value), T(() => {
        x.value.focus(), E.value = "";
      }));
    }, xe = il(), le = () => {
      l.dropdownMode === "custom" && !xe.dropdownRender && (D.value = !1, T(() => {
        D.value = null;
      }));
    };
    ie(() => {
      document.addEventListener("click", le);
    }), Ve(() => {
      document.removeEventListener("click", le);
    });
    const x = n(), Te = n(), te = n(!1), oe = d(() => {
      if (D.value !== null) return D.value;
      if (l.open !== void 0) return l.open;
    }), V = 1e6, u = n(100), i = n(100), z = n(!1), ae = n(!0), se = n(!1);
    de(() => {
      s.value && l.mode == "combobox" && (ae.value = !0, setTimeout(() => {
        var t;
        let e = (t = x.value) == null ? void 0 : t.$el.querySelectorAll(".ant-select-selection-item");
        if (e && e.length > 0)
          for (let o = 0; o < e.length; o++) {
            let a = e[o];
            a.scrollWidth <= a.offsetWidth && (ae.value = !1), a.title = "";
          }
      }, 300));
    }), de(() => {
      l.options && (Te.value = l.options.map((e) => (e.title = e.title ? e.title : "", e)));
    });
    const We = () => {
      setTimeout(async () => {
        u.value = 100, await N(), u.value = i.value, b.value = !0;
      }, 100);
    };
    de(() => {
      se.value === !0 && l.mode != "combobox" && s.value && s.value.length > 0 && l.options.length > 0 && (console.log("watchEffect", s.value), se.value = !1, We());
    }), ie(() => {
      se.value = !0, l.focusOpen || (i.value = 1, u.value = i.value, b.value = !0);
    });
    const Pe = d(() => l.width ? l.width : "230px"), Re = d(() => l.height ? l.height : "auto"), ke = n(3e3), qe = d(() => ({
      "z-index": ke.value
    })), Ie = d(() => {
      var t;
      let e = [];
      if (l.mode != "combobox" && Array.isArray(s.value))
        s.value.map((o) => {
          var p;
          let a = (p = l.options) == null ? void 0 : p.find((v) => v[L.value] == o);
          a && e.push(a[K.value]);
        });
      else if (l.mode == "combobox" && s.value) {
        let o = (t = l.options) == null ? void 0 : t.find((a) => a[L.value] == s.value);
        o && e.push(o[K.value]);
      }
      return Il.value === "zh-CN" ? e.join("、") : e.join(", ");
    }), He = d(() => {
      var t;
      if (l.mode === "combobox") return !1;
      let e = l.options.filter((o) => !o.disabled);
      return !!(Array.isArray(s.value) && ((t = s.value) == null ? void 0 : t.length) == e.length);
    }), Ze = d(() => {
      var t, o;
      if (l.mode === "combobox") return !1;
      let e = l.options.filter((a) => !a.disabled);
      return !!(Array.isArray(s.value) && ((t = s.value) == null ? void 0 : t.length) > 0 && ((o = s.value) == null ? void 0 : o.length) < e.length);
    }), Ke = d(() => {
      var e, t;
      return l.optionFilterProp ? l.optionFilterProp : (e = l.fieldNames) != null && e.label ? (t = l.fieldNames) == null ? void 0 : t.label : "label";
    }), K = d(() => {
      var e;
      return l.fieldNames && l.fieldNames.label ? (e = l.fieldNames) == null ? void 0 : e.label : "label";
    }), L = d(() => {
      var e;
      return l.fieldNames && l.fieldNames.value ? (e = l.fieldNames) == null ? void 0 : e.value : "value";
    }), Ue = d(() => ({
      width: typeof l.width == "number" ? l.width + "px" : l.width
    })), ne = n(!1), je = n({
      display: "block",
      color: Tl("--das-ui-select-overlay-error-color").value,
      "white-space": "break-spaces"
    }), O = n(), Xe = () => {
      var o;
      B.value = ge(), A.value = be();
      let e = (o = x.value) == null ? void 0 : o.$el.querySelectorAll(".ant-select-selection-item");
      !!(Array.isArray(s.value) ? s.value.length : e != null && e.length) || B.value === A.value || A.value - B.value < 1 ? S.value = !1 : (S.value = !0, O.value && clearTimeout(O.value)), ne.value = !0;
    }, Ge = () => {
      O.value = setTimeout(() => {
        S.value = !1;
      }, 200), ne.value = !1;
    }, Je = (e, t) => {
      e ? Xe() : Ge();
    }, Qe = (e) => {
      e && (ke.value = Vl().nextZIndex(), E.value = ""), U.value = e, l.mode == "combobox" && (e || setTimeout(() => {
        var t, o;
        (o = (t = x.value) == null ? void 0 : t.blur) == null || o.call(t);
      })), w("dropdownVisibleChange", e);
    }, Ye = (e) => {
      let t = e.toString();
      return t.length > l.maxTagTextLength && (t = t.substr(0, l.maxTagTextLength) + "..."), t;
    }, el = (e) => l.isRenderNode ? M.value : l.getPopupContainer === void 0 ? document.body : l.getPopupContainer(e), ll = (e) => {
      if (e) {
        Array.isArray(s.value) || (s.value = []);
        let t = s.value, o = [];
        l.options.forEach((a) => {
          !s.value.includes(a[L.value]) && !a.disabled && (t.push(a[L.value]), o.push(a));
        }), s.value = t, ue(s.value, o);
      } else {
        let t = s.value;
        s.value = t.filter((o) => !!l.options.find((a) => a[L.value] === o).disabled), ue(s.value, []);
      }
    }, tl = (e) => {
      if (e.className.indexOf("ant-select-multiple") > -1 && e.children[0])
        return e.children[0];
    }, ol = (e) => {
      if (l.mode == "combobox") {
        w("focus", e);
        return;
      }
      te.value = !0, l.focusOpen && !l.isExterControlCount && (u.value = V, b.value = !1), w("focus", e);
    }, U = n(!1), al = () => {
      U.value || setTimeout(() => {
        var e, t;
        (t = (e = x.value) == null ? void 0 : e.blur) == null || t.call(e);
      }), l.mode != "combobox";
    }, Se = (e) => {
      if (T(() => {
        U.value = !1;
      }), l.mode == "combobox") {
        w("blur", e);
        return;
      }
      te.value = !1, l.focusOpen && !l.isExterControlCount && (N(), u.value = i.value, b.value = !0), w("blur", e);
    }, sl = (e) => {
      e.onClose(), u.value = 100, T(() => {
        l.mode !== "combobox" && oe.value || l.focusOpen && (N(), u.value = i.value, b.value = !0);
      });
    };
    G(
      () => l.disabled || l.isView,
      (e) => {
        if (e && l.mode !== "combobox") {
          te.value = !1;
          let t = new Event("blur");
          Se(t);
        }
      }
    );
    let R = n(!1);
    const nl = (e) => {
      R.value = e, z.value = !0, T(() => {
        z.value = !1, l.focusOpen && (N(), u.value = e ? V : i.value, b.value = !e);
      });
    };
    let j = null;
    ie(() => {
      j = new IntersectionObserver((e) => {
        e && e[0] && e[0].intersectionRatio > 0 && l.focusOpen && u.value === 0 && (u.value = 100, T(() => {
          N(), u.value = i.value, b.value = !0;
        }));
      }), j.observe(M.value);
    }), Ve(() => {
      j && j.disconnect();
    });
    const N = () => {
      var X;
      let e = (X = x.value) == null ? void 0 : X.$el;
      if (!e) return;
      let t = e == null ? void 0 : e.querySelector(".ant-select-selection-overflow");
      if (!t) return;
      let o = t.offsetWidth - 5;
      l.borderType === "underline" && (o -= 10);
      const p = Math.ceil(ye.value.querySelector(".ant-tag").offsetWidth) + 4;
      let v = e.querySelectorAll(".ant-select-selection-overflow-item");
      if (v.length < 1) return;
      u.value = V;
      let _ = 0;
      for (let m = 0; m < v.length - 1 && !v[m].classList.contains("ant-select-selection-overflow-item-rest"); m++)
        if (_ += Math.ceil(v[m].offsetWidth), _ <= o - p)
          m >= s.value.length - 1 && _ < o ? i.value = s.value.length : i.value = m + 1;
        else {
          m >= s.value.length - 1 && _ < o ? i.value = s.value.length : i.value = m;
          break;
        }
      if (i.value === 0) {
        let m = v[0], rl = m.querySelector(".anticon-close") ? 86 : 69;
        m && !m.classList.contains("ant-select-selection-overflow-item-rest") && rl <= o - p && !xe.tagRender && (i.value = 1, m.classList.add("ellipsis"));
      }
    }, re = n(!1);
    G(
      () => s.value,
      async () => {
        if (re.value) {
          re.value = !1;
          return;
        }
        l.mode !== "combobox" && oe.value || (console.log("-----watch-----", s.value), z.value = !0, u.value = V, await T(), await N(), z.value = !1, l.isExterControlCount && l.focusOpen ? (u.value = R.value ? V : i.value, b.value = !R.value) : (u.value = i.value, b.value = !0));
      }
    );
    const ue = async (e, t) => {
      re.value = !0, U.value = !1, l.mode === "combobox" && le();
      const o = e;
      l.noDropdown && l.maxTagsLength < o.length && o.pop(), z.value = !0, console.log("-----seleceChange-----", o), w("update:model-value", o), w("change", o, t), u.value = V, await T(), await N(), z.value = !1, l.isExterControlCount && l.focusOpen && (u.value = R.value ? V : i.value, b.value = !R.value), l.focusOpen || (u.value = i.value, console.log("selectChange--------", u.value));
    };
    return $({
      $select: x,
      toChangeMaxCount: nl
    }), (e, t) => {
      const o = dl("v-nodes");
      return c(), g(
        "div",
        {
          class: cl(["das-ui-select", [
            l.borderType,
            l.isView ? "readonly" : "",
            l.error ? "is-error" : "",
            b.value ? "show-ellipsis" : ""
          ]]),
          ref_key: "$selectBox",
          ref: M,
          style: q(Ue.value)
        },
        [
          y(r(bl), {
            ref_key: "inputTooltipRef",
            ref: he,
            placement: "top",
            "virtual-triggering": "",
            "virtual-ref": Me.value,
            disabled: Ae.value,
            content: Be.value
          }, null, 8, ["virtual-ref", "disabled", "content"]),
          ce((c(), H(r(ml), me({ mode: e.mode }, e.$attrs, {
            value: r(s),
            "onUpdate:value": t[4] || (t[4] = (a) => vl(s) ? s.value = a : null),
            ref_key: "$select",
            ref: x,
            options: Te.value,
            fieldNames: e.fieldNames,
            bordered: l.borderType === "bordered",
            disabled: l.disabled || l.isView,
            showArrow: !0,
            open: l.noDropdown ? !1 : oe.value,
            placeholder: Z.value,
            optionFilterProp: Ke.value,
            size: l.size == "middle" ? "defalut" : l.size == "mini" ? "small" : l.size,
            style: l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {},
            dropdownClassName: "das-ui-select-dorpdown " + e.dropdownClassName,
            maxTagCount: u.value,
            getPopupContainer: el,
            dropdownStyle: qe.value,
            onDropdownVisibleChange: Qe,
            onChange: ue,
            onFocus: ol,
            onClick: [
              al,
              t[5] || (t[5] = J(() => {
              }, ["stop"]))
            ],
            onBlur: Se
          }), fl({
            option: f((a) => [
              C(e.$slots, "option", Q(Y(a)), () => {
                var p;
                return [
                  a.children && typeof a.children == "function" ? (c(), H(o, {
                    key: 0,
                    vnodes: a.children()
                  }, null, 8, ["vnodes"])) : (c(), g(
                    fe,
                    { key: 1 },
                    [
                      k(' :option="{value, label, [disabled, key, title]}" '),
                      e.mode === "combobox" ? ce((c(), g("div", _l, [
                        ve(
                          W(a[K.value]),
                          1
                          /* TEXT */
                        )
                      ])), [
                        [r(Le)]
                      ]) : (c(), g(
                        fe,
                        { key: 1 },
                        [
                          k(` <das-tooltip v-if="mode === 'combobox'" placement="right-start" :text="option[labelKeyName]"></das-tooltip> `),
                          h("div", $l, [
                            (c(), H(r(ze), {
                              class: "das-select-checkbox",
                              modelValue: (p = r(s)) == null ? void 0 : p.includes(a[L.value]),
                              key: a[L.value],
                              disabled: a.disabled
                            }, null, 8, ["modelValue", "disabled"])),
                            ce((c(), g("div", Fl, [
                              ve(
                                W(a[K.value]),
                                1
                                /* TEXT */
                              )
                            ])), [
                              [r(Le)]
                            ])
                          ])
                        ],
                        2112
                        /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
                      ))
                    ],
                    64
                    /* STABLE_FRAGMENT */
                  ))
                ];
              }, !0)
            ]),
            tagRender: f((a) => [
              C(e.$slots, "tagRender", Q(Y(a)), () => [
                y(r(pe), {
                  closable: a.closable,
                  style: { "margin-right": "3px", "background-color": "transparent" },
                  onClose: (p) => sl(a)
                }, {
                  default: f(() => [
                    h(
                      "span",
                      {
                        class: "tag-span",
                        style: q(l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {})
                      },
                      W(Ye(a.label)),
                      5
                      /* TEXT, STYLE */
                    )
                  ]),
                  _: 2
                  /* DYNAMIC */
                }, 1032, ["closable", "onClose"])
              ], !0)
            ]),
            dropdownRender: f(({ menuNode: a }) => [
              C(e.$slots, "dropdownRender", Q(Y({ menuNode: a })), () => {
                var p;
                return [
                  Ce.value === "combobox" ? (c(), g("div", Ml, [
                    y(o, { vnodes: a }, null, 8, ["vnodes"])
                  ])) : Ce.value === "custom" ? (c(), g("div", {
                    key: 1,
                    onClick: t[2] || (t[2] = J(() => {
                    }, ["stop"]))
                  }, [
                    y(o, { vnodes: a }, null, 8, ["vnodes"]),
                    h(
                      "div",
                      {
                        class: "customDropdown",
                        onMousedown: t[1] || (t[1] = (v) => v.preventDefault())
                      },
                      [
                        y(r(gl), me({
                          ref_key: "testInput",
                          ref: De,
                          modelValue: E.value,
                          "onUpdate:modelValue": t[0] || (t[0] = (v) => E.value = v),
                          onKeyup: pl(we, ["enter"]),
                          onFocus: J(Ee, ["stop"]),
                          onBlur: J(Oe, ["stop"]),
                          width: "100%",
                          borderType: "bordered"
                        }, l.inputAttrs), null, 16, ["modelValue"]),
                        h(
                          "div",
                          {
                            class: "addBtn",
                            onClick: we
                          },
                          W(r(P)("添加")),
                          1
                          /* TEXT */
                        )
                      ],
                      32
                      /* NEED_HYDRATION */
                    )
                  ])) : (c(), g("div", Al, [
                    y(o, { vnodes: a }, null, 8, ["vnodes"]),
                    (p = l.options) != null && p.length ? (c(), g(
                      "div",
                      {
                        key: 0,
                        class: "das-ui-select-dropdown-checkall",
                        onMousedown: t[3] || (t[3] = (v) => v.preventDefault())
                      },
                      [
                        h("div", Bl, [
                          y(r(ze), {
                            modelValue: He.value,
                            indeterminate: Ze.value,
                            onChange: ll,
                            style: { display: "flex" }
                          }, {
                            default: f(() => [
                              ve(
                                W(r(P)("全选")),
                                1
                                /* TEXT */
                              )
                            ]),
                            _: 1
                            /* STABLE */
                          }, 8, ["modelValue", "indeterminate"])
                        ]),
                        h("span", {
                          class: "das-ui-dropdown-has-checked",
                          innerHTML: r(P)("das-ui-select-selectedItemsCountWithPlaceholder", ee.value)
                        }, null, 8, Dl)
                      ],
                      32
                      /* NEED_HYDRATION */
                    )) : k("v-if", !0)
                  ]))
                ];
              }, !0)
            ]),
            clearIcon: f(() => [
              C(e.$slots, "clearIcon", {}, () => [
                y(r(Cl), { size: "medium" })
              ], !0)
            ]),
            maxTagPlaceholder: f((a) => [
              C(e.$slots, "maxTagPlaceholder", Q(Y(a)), () => [
                k(" 隐藏tag时显示的内容 "),
                y(r(pe), {
                  style: q(l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {})
                }, {
                  default: f(() => [
                    h("span", {
                      innerHTML: r(P)("das-ui-select-selectedItemsCountWithPlaceholder", ee.value)
                    }, null, 8, El)
                  ]),
                  _: 1
                  /* STABLE */
                }, 8, ["style"]),
                k(" <a-tag>+{{ currValue?.length - maxTagCountCell }}</a-tag> ")
              ], !0)
            ]),
            suffixIcon: f(() => [
              C(e.$slots, "suffixIcon", {}, () => [
                y(r(yl), {
                  class: "das-suffix-icon",
                  size: "medium"
                })
              ], !0)
            ]),
            default: f(() => [
              C(e.$slots, "default", {}, void 0, !0)
            ]),
            _: 2
            /* DYNAMIC */
          }, [
            e.$slots.menuItemSelectedIcon ? {
              name: "menuItemSelectedIcon",
              fn: f(() => [
                C(e.$slots, "menuItemSelectedIcon", {}, void 0, !0)
              ]),
              key: "0"
            } : void 0,
            e.$slots.notFoundContent ? {
              name: "notFoundContent",
              fn: f(() => [
                C(e.$slots, "notFoundContent", {}, void 0, !0)
              ]),
              key: "1"
            } : void 0,
            e.$slots.placeholder ? {
              name: "placeholder",
              fn: f(() => [
                C(e.$slots, "placeholder", {}, void 0, !0)
              ]),
              key: "2"
            } : void 0,
            e.$slots.removeIcon ? {
              name: "removeIcon",
              fn: f(() => [
                C(e.$slots, "removeIcon", {}, void 0, !0)
              ]),
              key: "3"
            } : void 0
          ]), 1040, ["mode", "value", "options", "fieldNames", "bordered", "disabled", "open", "placeholder", "optionFilterProp", "size", "style", "dropdownClassName", "maxTagCount", "dropdownStyle"])), [
            [r(hl), { target: tl, x: !1 }],
            [r(xl), Je]
          ]),
          e.error && e.errorLabel ? (c(), g(
            fe,
            { key: 0 },
            [
              e.errorMode === "default" ? (c(), g("div", Ol, [
                h(
                  "span",
                  {
                    style: q(je.value)
                  },
                  W(e.errorLabel),
                  5
                  /* TEXT, STYLE */
                )
              ])) : k("v-if", !0),
              e.errorMode === "overlay" && ne.value ? (c(), H(r(wl), {
                key: 1,
                errorLabel: e.errorLabel,
                getEl: () => x.value.$el,
                errorModelZIndex: e.errorModelZIndex
              }, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : k("v-if", !0)
            ],
            64
            /* STABLE_FRAGMENT */
          )) : k("v-if", !0),
          h(
            "div",
            {
              class: "ant-select-selection-overflow",
              ref_key: "virtualTotalCount",
              ref: ye,
              style: { position: "absolute", left: "-50%", top: "-50%", opacity: "0", "pointer-events": "none" }
            },
            [
              h("div", Wl, [
                h("div", Pl, [
                  h("span", Rl, [
                    y(r(pe), {
                      style: q(l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {})
                    }, {
                      default: f(() => [
                        h("span", {
                          innerHTML: r(P)("das-ui-select-selectedItemsCountWithPlaceholder", ee.value)
                        }, null, 8, ql)
                      ]),
                      _: 1
                      /* STABLE */
                    }, 8, ["style"])
                  ])
                ])
              ])
            ],
            512
            /* NEED_PATCH */
          )
        ],
        6
        /* CLASS, STYLE */
      );
    };
  }
}), Fe = (I, $) => {
  const F = I.__vccOpts || I;
  for (const [l, w] of $)
    F[l] = w;
  return F;
}, Kl = /* @__PURE__ */ Fe(Zl, [["__scopeId", "data-v-ff4b9c6d"]]), Ul = {};
function jl(I, $) {
  const F = Nl;
  return c(), H(
    F,
    me({ class: "das-ui-select-option" }, I.$attrs),
    null,
    16
    /* FULL_PROPS */
  );
}
const Xl = /* @__PURE__ */ Fe(Ul, [["render", jl]]), Gl = {
  "--das-ui-select-color-bg": "#FFFFFF",
  // 默认背景色
  "--das-ui-select-color-primary": Ne("--das-ui-color-primary"),
  // 主题色
  "--das-ui-select-color-text": "#212121",
  // 主文本色
  "--das-ui-select-color-border": "#d9d9d9",
  // 边框基础色
  "--das-ui-select-color-underline": Ne("--das-ui-color-help"),
  // 下划线基础色
  "--das-ui-select-color-error": "#FB2323",
  // 错误边框色
  "--das-ui-select-color-disabled-text": "#B2B2B2",
  // 禁用文本色
  "--das-ui-select-color-disabled-underline": "#e5e5e5",
  // 禁用下划线色
  "--das-ui-select-color-disabled-border": "#d9d9d9",
  // 禁用边框色
  "--das-ui-select-color-disabled-bg": "#f5f5f5",
  // 禁用背景色
  "--das-ui-select-color-option-active-bg": "#F2F6FF",
  // 待选项选中时背景色
  "--das-ui-select-color-help": "#999999",
  // 提示文字颜色
  "--das-ui-select-height-sm": "24px",
  // 选择框-sm-尺寸高度
  "--das-ui-select-height-md": "30px",
  // 选择框-md-尺寸高度
  "--das-ui-select-height-lg": "36px",
  // 选择框-lg-尺寸高度
  "--das-ui-select-max-height-sm": "66px",
  // 内容区显示的最大高度-sm
  "--das-ui-select-max-height-md": "82px",
  // 内容区显示的最大高度-md
  "--das-ui-select-max-height-lg": "85px",
  // 内容区显示的最大高度-lg
  "--das-ui-select-tag-font-size-mini": "12px",
  // 多选框字体大小-mini
  "--das-ui-select-tag-font-size-sm": "14px",
  // 多选框字体大小-sm
  "--das-ui-select-tag-font-size-md": "14px",
  // 多选框字体大小-md
  "--das-ui-select-tag-font-size-lg": "15px",
  // 多选框字体大小-lg
  "--das-ui-select-overlay-error-color": "#FB2323",
  "--das-ui-select-overlay-error-bg-color": "#FFDBE0"
}, Jl = {
  添加: { "zh-CN": "添加", en: "Add", _appCode: "framework" },
  全选: { "zh-CN": "全选", en: "Select All", _appCode: "framework" },
  已选: { "zh-CN": "已选", en: "Selected", _appCode: "framework" },
  "das-ui-select-selectedItemsCountWithPlaceholder": {
    "zh-CN": "已选$0项",
    en: "$0 Items Selected",
    _appCode: "framework"
  }
};
Sl(Jl);
kl(Gl);
const yt = _e(Kl), Ct = _e(Xl), wt = { name: "select 选择器" };
export {
  yt as DasSelect,
  Ct as DasSelectOption,
  wt as default
};
