"""Feedback components for user interaction.""" import gradio as gr def ProcessingIndicator(steps: list[dict], current_step: int = 0) -> gr.HTML: """ Render a processing indicator with steps. Args: steps: List of {"label": str, "status": "pending"|"active"|"complete"} current_step: Index of current step """ html = '
' for i, step in enumerate(steps): if i < current_step: icon = "✓" color = "#22c55e" elif i == current_step: icon = "●" color = "#3b82f6" else: icon = "○" color = "#9ca3af" html += f'''
{icon} {step["label"]}
''' html += '
' return gr.HTML(html) def EmptyState( title: str, description: str | None = None, icon: str = "📭", ) -> None: """ Render an empty state message. Args: title: Empty state title description: Optional description icon: Emoji icon """ gr.HTML(f'''
{icon}
{title}
{f'
{description}
' if description else ''}
''')