import React from "react";

type UploadMessagesProps = {
  isEdiFile: boolean;
  unsupportedInfo: string | null;
  qsoCountWarning: string | null;
  qsoCallsignInfo: string | null;
  rhbbsWarning: string | null;
  error: string | null;
  success: string | null;
};

export default function UploadMessages({
  isEdiFile,
  unsupportedInfo,
  qsoCountWarning,
  qsoCallsignInfo,
  rhbbsWarning,
  error,
  success,
}: UploadMessagesProps) {
  return (
    <>
      {!isEdiFile && unsupportedInfo && <div className="text-sm text-red-600">{unsupportedInfo}</div>}
      {qsoCountWarning && <div className="text-sm text-amber-600">{qsoCountWarning}</div>}
      {qsoCallsignInfo && <div className="text-sm text-amber-600 whitespace-pre-line">{qsoCallsignInfo}</div>}
      {rhbbsWarning && <div className="text-sm text-amber-600 whitespace-pre-line">{rhbbsWarning}</div>}
      {error && <div className="text-sm text-red-600 whitespace-pre-line">{error}</div>}
      {success && <div className="text-sm text-green-600">{success}</div>}
    </>
  );
}
