"""Renderer for status events."""

from __future__ import annotations

from rich.console import RenderableType
from rich.text import Text

from clients.terminal.tui.themes import get_active_theme

from .base import ContentRenderer


class StatusRenderer(ContentRenderer):
    """Render a system status line dimmed."""

    def accepts(self, msg: dict) -> bool:
        return msg.get("type") == "status"

    def render(self, msg: dict) -> RenderableType:
        theme = get_active_theme()
        text = msg.get("content", "") or str(msg)
        return Text(f"• {text}", style=theme.text_dim.hex)
