import * as React from 'react';
import { cn } from '@/lib/utils';

export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;

export const Input = React.forwardRef<HTMLInputElement, InputProps>(
  ({ className, type, ...props }, ref) => (
    <input
      type={type}
      className={cn(
        'flex h-11 w-full rounded-md border border-ink-200 bg-paper-50 px-3 py-2 text-base ring-offset-paper',
        'placeholder:text-ink-300',
        'focus-visible:outline-none focus-visible:border-saffron-500 focus-visible:ring-2 focus-visible:ring-saffron-500/40',
        'disabled:cursor-not-allowed disabled:opacity-50',
        'transition-colors',
        className,
      )}
      ref={ref}
      {...props}
    />
  ),
);
Input.displayName = 'Input';
