#!/usr/bin/env python3
"""Show a message box on Windows without VBS."""

import sys


def notify(title: str, message: str, error: bool = False) -> None:
    if sys.platform == "win32":
        try:
            import ctypes

            icon = 0x10 if error else 0x40
            ctypes.windll.user32.MessageBoxW(  # type: ignore[attr-defined]
                0, message, title, icon
            )
        except Exception:
            print(f"{title}: {message}")
    else:
        print(f"{title}: {message}")
