"""WebView information model."""

from dataclasses import dataclass
from typing import Optional


@dataclass
class WebViewInfo:
    """Information about a discovered WebView."""

    pid: int
    name: str
    bundle_id: Optional[str] = None
    debug_port: Optional[int] = None
    debug_ws_url: Optional[str] = None
    platform: str = "unknown"

    def __str__(self) -> str:
        return f"WebView({self.name}, PID: {self.pid})"
