'use client' import React from 'react' interface LoadingSpinnerProps { progress?: number // 0-100 size?: number // diameter in pixels strokeWidth?: number className?: string } const LoadingSpinner: React.FC = ({ progress = 0, size = 120, strokeWidth = 8, className = '' }) => { const radius = (size - strokeWidth) / 2 const circumference = radius * 2 * Math.PI const strokeDasharray = circumference const strokeDashoffset = circumference - (progress / 100) * circumference return (
{/* Background circle */} {/* Progress circle */} {/* Percentage text */}
{Math.round(progress)}%
{/* Loading text */}
Loading Model...
) } export default LoadingSpinner