import { forwardRef } from "react"; import { getAssetPath, ASSETS } from "../../../../lib/assetUtils"; import type { TextInputViewProps } from "./TextInput.types"; export const TextInputView = forwardRef( ( { inputId, labelId, label, placeholder, value, name, type, disabled, error = false, className: _className, containerClasses, labelClasses, inputClasses, borderRadius, handleChange, handleFocus, handleBlur, handleMouseDown, showHelpIcon = true, inputWrapperClasses = "relative", focusRingClasses = "", textHint = false, formHeader = true, maxLength, helpIconAlt, hintDefault, autoComplete, inputMode, required = false, form, onKeyDown, state: _state, isFilled: _isFilled, }, ref, ) => { const labelEl = label ? ( formHeader ? (
{showHelpIcon && (
{/* eslint-disable-next-line @next/next/no-img-element -- icon asset */} {helpIconAlt}
)}
) : ( ) ) : null; return (
{labelEl}
{focusRingClasses && ( {textHint && (

{typeof textHint === "string" ? textHint : hintDefault}

)}
); }, ); TextInputView.displayName = "TextInputView";