import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { forwardRef } from "react";
import { twMerge } from "tailwind-merge";
export const RWATableTextInput = forwardRef(function RWATableTextInput(props, ref) {
    const invalid = props["aria-invalid"] === "true";
    const { errorMessage, labelClassName, inputClassName, errorMessageClassName, ...inputProps } = props;
    return (_jsxs("label", { className: labelClassName, children: [_jsx("input", { ...inputProps, className: twMerge("h-8 w-full rounded-md border border-transparent bg-gray-100 p-3 text-right placeholder:text-gray-500 disabled:bg-transparent disabled:p-0 disabled:text-left", invalid && "border-red-900 outline-red-900 placeholder:text-red-800", inputClassName), ref: ref, type: "text" }), invalid && !!errorMessage ? (_jsx("p", { className: twMerge("text-sm text-red-900", errorMessageClassName), role: "alert", children: errorMessage })) : null] }));
});
//# sourceMappingURL=text-input.js.map