import { jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import InputWithIcon from "./InputWithIcon.js";
import VanillaInput from "./VanillaInput.js";
/* empty css                  */
const Input = forwardRef(
  ({
    label,
    isRequired = false,
    leftIcon,
    rightIcon,
    leftIconClick,
    rightIconClick,
    helperText,
    isHelperText = false,
    focusedText,
    autoComplete,
    isError = false,
    isDisabled = false,
    htmlFor,
    iconClickOnDisabled = false,
    size = "large",
    ...args
  }, ref) => {
    if (leftIcon ?? rightIcon) {
      return /* @__PURE__ */ jsx(
        InputWithIcon,
        {
          ...args,
          autoComplete,
          focusedText,
          helperText,
          htmlFor,
          iconClickOnDisabled,
          inputRef: ref,
          isDisabled,
          isError,
          isHelperText,
          isRequired,
          label,
          leftIcon,
          leftIconClick,
          rightIcon,
          rightIconClick,
          size
        }
      );
    }
    return /* @__PURE__ */ jsx(
      VanillaInput,
      {
        ...args,
        autoComplete,
        focusedText,
        helperText,
        htmlFor,
        inputRef: ref,
        isDisabled,
        isError,
        isHelperText,
        isRequired,
        label,
        size
      }
    );
  }
);
Input.displayName = "Input";
export {
  Input
};
