from __future__ import annotations from .components import _event_label from .html_utils import attr, escape def _account_row(account: dict[str, str | int | None], csrf: str = "", admin_path: str = "/admin") -> str: hostname = escape(account["hostname"]) status = "Active" if account.get("accepted_at") else "Pending" ipv4 = escape(account.get("ipv4") or "-") ipv6 = escape(account.get("ipv6") or "-") updated = escape(account.get("updated_at") or "Never") safe_admin_path = attr(admin_path) return f"""