type SpinnerSize = 'sm' | 'md' | 'lg';

interface SpinnerProps {
  size?: SpinnerSize;
}

const sizeClass: Record<SpinnerSize, string> = {
  sm: 'w-4 h-4',
  md: 'w-6 h-6',
  lg: 'w-10 h-10',
};

export function Spinner({ size = 'md' }: SpinnerProps) {
  return (
    <div
      className={`${sizeClass[size]} border-2 border-border border-t-accent-blue rounded-full animate-spin`}
      role="status"
    >
      <span className="sr-only">Loading</span>
    </div>
  );
}
