import * as r from "react";
import { useContext as s, useMemo as g } from "react";
import x from "../../../classnames/index.mjs";
import { devUseWarning as d } from "../_util/warning.mjs";
import "../config-provider/index.mjs";
import { FormItemInputContext as m } from "../form/context.mjs";
import I from "./style/index.mjs";
import { ConfigContext as v } from "../config-provider/context.mjs";
const E = (e) => {
  const {
    getPrefixCls: o,
    direction: c
  } = s(v), {
    prefixCls: a,
    className: i
  } = e, t = o("input-group", a), u = o("input"), [l, f] = I(u), p = x(t, {
    [`${t}-lg`]: e.size === "large",
    [`${t}-sm`]: e.size === "small",
    [`${t}-compact`]: e.compact,
    [`${t}-rtl`]: c === "rtl"
  }, f, i), n = s(m), C = g(() => Object.assign(Object.assign({}, n), {
    isFormItemInput: !1
  }), [n]);
  return process.env.NODE_ENV !== "production" && d("Input.Group").deprecated(!1, "Input.Group", "Space.Compact"), l(/* @__PURE__ */ r.createElement("span", {
    className: p,
    style: e.style,
    onMouseEnter: e.onMouseEnter,
    onMouseLeave: e.onMouseLeave,
    onFocus: e.onFocus,
    onBlur: e.onBlur
  }, /* @__PURE__ */ r.createElement(m.Provider, {
    value: C
  }, e.children)));
}, w = E;
export {
  w as default
};
