import { Loader2 } from 'lucide-react';

interface LoadingProps {
  fullScreen?: boolean;
  text?: string;
}

export function Loading({ fullScreen = false, text = 'Loading...' }: LoadingProps) {
  if (fullScreen) {
    return (
      <div className="fixed inset-0 bg-white flex flex-col items-center justify-center z-50">
        <Loader2 className="h-6 w-6 animate-spin text-brand-600 mb-3" />
        <span className="text-sm text-gray-400">{text}</span>
      </div>
    );
  }

  return (
    <div className="flex flex-col items-center justify-center py-12">
      <Loader2 className="h-5 w-5 animate-spin text-brand-600 mb-2" />
      <span className="text-sm text-gray-400">{text}</span>
    </div>
  );
}
