import { r as reactExports, j as jsxRuntimeExports, t as twMerge, a8 as twJoin } from "./index-DEuI3Aoa.js";
const FormInput = reactExports.forwardRef(function FormInput2(props, ref) {
  const { icon, errorMessage, isDirty, containerClassName, inputClassName, errorMessageClassName, hideErrors = false, ...delegatedProps } = props;
  const type = props.type ?? "text";
  const isError = !!errorMessage;
  return jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsxs("div", { className: twMerge("mb-1 flex gap-2 rounded-md border border-gray-200 bg-gray-50 p-3 text-black placeholder:text-gray-50", isError && "border-red-900", containerClassName), children: [icon && jsxRuntimeExports.jsx("span", { className: twJoin((!isDirty || isError) && "text-slate-200"), children: icon }), jsxRuntimeExports.jsx("input", { ...delegatedProps, className: twMerge("w-full bg-transparent font-semibold outline-none", inputClassName), ref, type })] }), jsxRuntimeExports.jsx("p", { className: twMerge("hidden min-h-4 text-xs text-red-900", isError && "block", hideErrors && "hidden", errorMessageClassName), children: errorMessage })] });
});
export {
  FormInput as F
};
//# sourceMappingURL=form-input-DucXwitU.js.map
