import { forwardRef } from 'react';

interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
  variant?: 'default' | 'error';
}

export const Input = forwardRef<HTMLInputElement, InputProps>(
  ({ className = '', variant = 'default', ...props }, ref) => {
    const baseClasses = 'px-3 py-2 border rounded-lg text-white bg-deep-graphite focus:outline-none focus:border-primary-blue transition-colors';
    const variantClasses = variant === 'error' ? 'border-racing-red' : 'border-charcoal-outline';
    const classes = `${baseClasses} ${variantClasses} ${className}`;

    return <input ref={ref} className={classes} {...props} />;
  }
);

Input.displayName = 'Input';