import { defineComponent as B, useSlots as x, shallowRef as S, computed as g, openBlock as F, createBlock as k, normalizeProps as s, guardReactiveProps as d, unref as o, createSlots as u, withCtx as n, createVNode as C, mergeProps as P, renderList as f, renderSlot as c } from "vue";
import { isUndefined as q, omit as m, pick as R } from "lodash-unified";
import "../../../ap-field/index.mjs";
import { apFormItemSlotNames as b } from "../../constant.mjs";
import "../../item/index.vue2.mjs";
import $ from "../../item/index.vue.mjs";
import w from "../../../ap-field/tree-select/index.vue.mjs";
const E = /* @__PURE__ */ B({
  name: "ApFormItemTreeSelect",
  __name: "index",
  props: {
    htmlFor: {},
    prefixCls: {},
    label: {},
    help: {},
    extra: {},
    labelCol: {},
    wrapperCol: {},
    hasFeedback: { type: Boolean, default: !1 },
    colon: { type: Boolean, default: void 0 },
    labelAlign: {},
    prop: {},
    name: {},
    rules: {},
    autoLink: { type: Boolean, default: !0 },
    required: { type: Boolean, default: void 0 },
    validateFirst: { type: Boolean, default: void 0 },
    validateStatus: {},
    validateTrigger: {},
    messageVariables: {},
    hidden: { type: Boolean },
    noStyle: { type: Boolean },
    tooltip: {},
    span: {},
    order: {},
    offset: {},
    push: {},
    pull: {},
    xs: {},
    sm: {},
    md: {},
    lg: {},
    xl: {},
    xxl: {},
    flex: {},
    bordered: { type: Boolean },
    valuePropName: {},
    initialValue: {},
    _signal: {},
    transform: {},
    description: {},
    customFilled: {},
    disabled: { type: Boolean, default: void 0 },
    autoFocus: { type: Boolean },
    field: { default: () => ({}) },
    placeholder: {}
  },
  setup(_, { expose: v }) {
    const e = _, i = x(), r = S(), h = g(() => ({
      placeholder: e.placeholder,
      disabled: e.disabled,
      ...e.field || {},
      bordered: e.bordered ? !1 : q(e.field?.bordered) ? !0 : e.field?.bordered
    }));
    return v({
      focus: () => {
        r.value?.focus();
      },
      blur: () => {
        r.value?.blur();
      },
      request: (t, p) => {
        r.value?.request(t, p);
      }
    }), (t, p) => (F(), k($, s(d(o(m)(e, ["field", "placeholder"]))), u({
      default: n(() => [
        C(o(w), P(h.value, {
          ref_key: "treeSelectRef",
          ref: r
        }), u({ _: 2 }, [
          f(o(m)(i, o(b)), (y, l) => ({
            name: l,
            fn: n((a) => [
              c(t.$slots, l, s(d(a || {})))
            ])
          }))
        ]), 1040)
      ]),
      _: 2
    }, [
      f(o(R)(i, o(b)), (y, l) => ({
        name: l,
        fn: n((a) => [
          c(t.$slots, l, s(d(a || {})))
        ])
      }))
    ]), 1040));
  }
});
export {
  E as default
};
