import React from 'react'; import { Card } from '../ui/Card.tsx'; import { Skeleton } from '../ui/Skeleton.tsx'; import { EmptyState } from '../ui/EmptyState.tsx'; import { ErrorState } from '../ui/ErrorState.tsx'; import { AlertTriangle, CheckCircle } from 'lucide-react'; interface StatePanelProps { type: 'loading' | 'empty' | 'error' | 'success' | 'retry'; onRetry?: () => void; title?: string; description?: string; } export const StatePanel: React.FC = ({ type, onRetry, title, description }) => { switch (type) { case 'loading': return (
); case 'empty': return ; case 'error': return ; case 'success': return (

{title || 'Operation successful'}

{description || 'All systems are operational.'}

); case 'retry': return (

{description || 'Something went wrong. You can retry.'}

{onRetry && ( )}
); default: return null; } };