import React, { useEffect, useRef } from 'react';
export const Input = ({ autoFocus, className, disabled, prefix, register, ...rest }) => {
    const inputRef = useRef(null);
    useEffect(() => {
        var _a;
        if (!disabled) {
            (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
        }
    }, [disabled]);
    return (React.createElement("div", { 
        // eslint-disable-next-line prettier/prettier
        className: `shadow-sm relative flex items-center rounded-lg border border-gray-500 bg-white ${prefix ? 'pl-3' : ''} ${className} ` },
        prefix && React.createElement("div", { className: ' text-xs text-gray-600' }, prefix),
        React.createElement("input", { ref: inputRef, ...register, ...rest, autoFocus: autoFocus, className: 'w-full  rounded-lg border-none text-xs font-normal focus:border-none  focus:outline-none focus:ring-transparent', disabled: disabled })));
};
//# sourceMappingURL=input.js.map