import { defineComponent, computed, createVNode } from 'vue';
import '../../../utils/index.mjs';
import { FormItemInputContext } from '../../form/src/FormItemContext.mjs';
import useConfigInject from '../../config-provider/src/hooks/useConfigInject.mjs';
import useStyle from '../style/index.mjs';
import { classNames } from '../../../utils/dom/class.mjs';

var AInputGroup = /* @__PURE__ */ defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "AInputGroup",
  inheritAttrs: false,
  props: {
    prefixCls: String,
    size: {
      type: String
    },
    compact: {
      type: Boolean,
      default: void 0
    }
  },
  setup(props, {
    slots,
    attrs
  }) {
    const {
      prefixCls,
      direction,
      getPrefixCls
    } = useConfigInject("input-group", props);
    const formItemInputContext = FormItemInputContext.useInject();
    FormItemInputContext.useProvide(formItemInputContext, {
      isFormItemInput: false
    });
    const inputPrefixCls = computed(() => getPrefixCls("input"));
    const [wrapSSR, hashId] = useStyle(inputPrefixCls);
    const cls = computed(() => {
      const pre = prefixCls.value;
      return {
        [`${pre}`]: true,
        [hashId.value]: true,
        [`${pre}-lg`]: props.size === "large",
        [`${pre}-sm`]: props.size === "small",
        [`${pre}-compact`]: props.compact,
        [`${pre}-rtl`]: direction.value === "rtl"
      };
    });
    return () => {
      var _a;
      return wrapSSR(createVNode("span", {
        ...attrs,
        "class": classNames(cls.value, attrs.class)
      }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]));
    };
  }
});

export { AInputGroup as default };
//# sourceMappingURL=Group.mjs.map
