import { defineComponent as B, useSlots as g, shallowRef as S, computed as F, openBlock as R, createBlock as k, normalizeProps as s, guardReactiveProps as i, unref as l, createSlots as c, withCtx as d, createVNode as _, mergeProps as C, renderList as f, renderSlot as m } from "vue";
import { omit as v, pick as P } from "lodash-unified";
import { ApField as w } from "../../../ap-field/index.mjs";
import { apFormItemSlotNames as b } from "../../constant.mjs";
import "../../item/index.vue2.mjs";
import A from "../../item/index.vue.mjs";
const E = /* @__PURE__ */ B({
  name: "ApFormItemText",
  __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(a, { expose: h }) {
    const { Text: x } = w, p = g(), y = a, e = S();
    return h({
      focus: (o) => {
        e.value?.focus(o);
      },
      blur: () => {
        e.value?.blur();
      },
      setSelectionRange: (o, u, r) => {
        e.value?.setSelectionRange(o, u, r);
      },
      select: () => {
        e.value?.select();
      },
      input: F(() => e.value?.input)
    }), (o, u) => (R(), k(A, s(i(l(v)(y, ["field", "placeholder"]))), c({
      default: d(() => [
        _(l(x), C({
          ref_key: "inputRef",
          ref: e,
          disabled: a.disabled,
          placeholder: a.placeholder
        }, a.field), c({ _: 2 }, [
          f(l(v)(p, l(b)), (r, t) => ({
            name: t,
            fn: d((n) => [
              m(o.$slots, t, s(i(n || {})))
            ])
          }))
        ]), 1040, ["disabled", "placeholder"])
      ]),
      _: 2
    }, [
      f(l(P)(p, l(b)), (r, t) => ({
        name: t,
        fn: d((n) => [
          m(o.$slots, t, s(i(n || {})))
        ])
      }))
    ]), 1040));
  }
});
export {
  E as default
};
