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

var Group = /* @__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", mergeProps(attrs, {
        "class": classNames(cls.value, attrs.class)
      }), [(_a = slots.default) == null ? void 0 : _a.call(slots)]));
    };
  }
});

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