import React from 'react'; import ReactDOM from 'react-dom'; export default function LoadingOverlay({ isLoading, text, subtext, progress, isArabic }) { if (!isLoading) return null; return ReactDOM.createPortal(
{/* Sleek Spinner / Radar */}

{text || (isArabic ? 'جاري المعالجة...' : 'Processing...')}

{subtext && (

{subtext}

)} {/* Progress Bar Track */}
{progress !== null && progress !== undefined && (
{progress}%
)}
, document.body ); }