'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
require('../../../utils/index.js');
var select = require('./select.js');
var createNamespace = require('../../../utils/create-namespace.js');

"use strict";
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{ name: "LlSelect" },
  __name: "select",
  props: select.selectProps,
  setup(__props, { expose: __expose }) {
    const bem = createNamespace.createNamespace("select");
    const props = __props;
    const attrs = vue.useAttrs();
    const selectRef = vue.ref();
    const getMaxTagCount = vue.computed(() => {
      return typeof props.maxTagCount === "number" ? props.maxTagCount <= 0 ? null : props.maxTagCount : null;
    });
    const getMaxTagTextLength = vue.computed(() => {
      return typeof props.maxTagTextLength === "number" ? props.maxTagTextLength <= 0 ? null : props.maxTagTextLength : null;
    });
    const focus = () => {
      selectRef.value.focus();
    };
    const blur = () => {
      selectRef.value.blur();
    };
    __expose({
      focus,
      blur
    });
    return (_ctx, _cache) => {
      const _component_a_select = vue.resolveComponent("a-select");
      return vue.openBlock(), vue.createBlock(_component_a_select, vue.mergeProps(vue.unref(attrs), {
        ref_key: "selectRef",
        ref: selectRef,
        "max-tag-count": getMaxTagCount.value,
        "max-tag-text-length": getMaxTagTextLength.value,
        class: [vue.unref(bem).b(), vue.unref(bem).is(_ctx.isGray ? "gray-select" : "")]
      }), vue.createSlots({
        _: 2
        /* DYNAMIC */
      }, [
        vue.renderList(Object.keys(_ctx.$slots), (item) => {
          return {
            name: item,
            fn: vue.withCtx((data) => [
              vue.renderSlot(_ctx.$slots, item, vue.normalizeProps(vue.guardReactiveProps(data || {})))
            ])
          };
        })
      ]), 1040, ["max-tag-count", "max-tag-text-length", "class"]);
    };
  }
});

exports.default = _sfc_main;
//# sourceMappingURL=select.vue2.js.map
