"use strict";
var import_Input = require("../Input.css");
const jsxRuntime = require("react/jsx-runtime");
const antd = require("antd");
const React = require("react");
const kit_internal_useInputEscape = require("./internal/useInputEscape.cjs");
const kit_Theme_UI = require("./Theme/UI.cjs");
require("./Theme/themeUtils.cjs");
require("./Theme/themes.cjs");
const Inputs_module = require("../Inputs.module-IVM4W4-x.cjs");
const Input = React.forwardRef(
  ({ width, ...props }, ref) => {
    const { onFocus, onBlur, inputRef } = kit_internal_useInputEscape.useInputEscape(ref, props.onBlur);
    const {
      themeSettings: { className }
    } = kit_Theme_UI.useTheme();
    const classes = (props == null ? void 0 : props.className) ? className.concat(" ", props.className) : className;
    return /* @__PURE__ */ jsxRuntime.jsx(
      antd.Input,
      {
        ...props,
        className: classes,
        ref: inputRef,
        style: { width },
        onBlur,
        onFocus
      }
    );
  }
);
const Group = (props) => {
  const {
    themeSettings: { className }
  } = kit_Theme_UI.useTheme();
  const classes = (props == null ? void 0 : props.className) ? className.concat(" ", props.className) : className;
  return /* @__PURE__ */ jsxRuntime.jsx(antd.Input.Group, { ...props, className: classes });
};
Input.Group = Group;
Input.Password = React.forwardRef((props, ref) => {
  const { onFocus, onBlur, inputRef } = kit_internal_useInputEscape.useInputEscape(ref);
  const {
    themeSettings: { className: themeClass }
  } = kit_Theme_UI.useTheme();
  return /* @__PURE__ */ jsxRuntime.jsx(
    antd.Input.Password,
    {
      ...props,
      className: [themeClass, Inputs_module.css.hasAffix].join(" "),
      ref: inputRef,
      onBlur,
      onFocus
    }
  );
});
Input.TextArea = React.forwardRef((props, ref) => {
  const { onFocus, onBlur, inputRef } = kit_internal_useInputEscape.useInputEscape(ref);
  const {
    themeSettings: { className: themeClass }
  } = kit_Theme_UI.useTheme();
  return /* @__PURE__ */ jsxRuntime.jsx(
    antd.Input.TextArea,
    {
      ...props,
      className: themeClass,
      ref: inputRef,
      onBlur,
      onFocus
    }
  );
});
module.exports = Input;
