'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
require('../../../utils/index.cjs');
var FormItemContext = require('../../form/src/FormItemContext.cjs');
var useConfigInject = require('../../config-provider/src/hooks/useConfigInject.cjs');
var index = require('../style/index.cjs');
var _class = require('../../../utils/dom/class.cjs');

var AInputGroup = /* @__PURE__ */ vue.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.default("input-group", props);
    const formItemInputContext = FormItemContext.FormItemInputContext.useInject();
    FormItemContext.FormItemInputContext.useProvide(formItemInputContext, {
      isFormItemInput: false
    });
    const inputPrefixCls = vue.computed(() => getPrefixCls("input"));
    const [wrapSSR, hashId] = index.default(inputPrefixCls);
    const cls = vue.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(vue.createVNode("span", {
        ...attrs,
        "class": _class.classNames(cls.value, attrs.class)
      }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]));
    };
  }
});

exports.default = AInputGroup;
//# sourceMappingURL=Group.cjs.map
