import { XCircle } from 'lucide-react';

interface ErrorMessageProps {
  message: string;
  className?: string;
}

const ErrorMessage = ({ message, className = '' }: ErrorMessageProps) => {
  if (!message) return null;

  return (
    <div
      className={`p-3 rounded-md bg-destructive/10 text-destructive text-sm flex items-start gap-2 ${className}`}
      role="alert"
    >
      <XCircle className="h-4 mt-0.5 shrink-0 text-current w-4" />
      <span>{message}</span>
    </div>
  );
};

export default ErrorMessage;
