import { defineComponent as y, useSlots as B, ref as x, openBlock as _, createBlock as g, normalizeProps as r, guardReactiveProps as s, unref as o, createSlots as p, withCtx as i, createVNode as k, mergeProps as F, renderList as f, renderSlot as u } from "vue";
import { omit as m, pick as S } from "lodash-unified";
import "../../../ap-field/switch/index.vue2.mjs";
import { apFormItemSlotNames as c } from "../../constant.mjs";
import "../../item/index.vue2.mjs";
import w from "../../item/index.vue.mjs";
import C from "../../../ap-field/switch/index.vue.mjs";
const q = /* @__PURE__ */ y({
  name: "ApFormItemSwitch",
  __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: {},
    valuePropName: { default: "checked" },
    initialValue: {},
    _signal: {},
    transform: {},
    description: {},
    customFilled: {},
    disabled: { type: Boolean, default: void 0 },
    autoFocus: { type: Boolean },
    field: { default: () => ({}) }
  },
  setup(l, { expose: b }) {
    const h = l, n = B(), t = x();
    return b({
      focus: () => t.value?.focus(),
      blur: () => t.value?.blur()
    }), (d, P) => (_(), g(w, r(s(o(m)(h, ["field", "disabled"]))), p({
      default: i(() => [
        k(C, F({
          ref_key: "switchRef",
          ref: t,
          disabled: l.disabled
        }, l.field), p({ _: 2 }, [
          f(o(m)(n, o(c)), (v, e) => ({
            name: e,
            fn: i((a) => [
              u(d.$slots, e, r(s(a || {})))
            ])
          }))
        ]), 1040, ["disabled"])
      ]),
      _: 2
    }, [
      f(o(S)(n, o(c)), (v, e) => ({
        name: e,
        fn: i((a) => [
          u(d.$slots, e, r(s(a || {})))
        ])
      }))
    ]), 1040));
  }
});
export {
  q as default
};
