"""
Qt imports for the QGIS 4 / PyQt6 plugin runtime.

The plugin imports Qt through this module so QGIS-bound code has one
stable import surface. It intentionally does not provide PyQt5-style enum
aliases; call sites should use native Qt6 enum scopes.
"""

from __future__ import annotations

try:
    from qgis.PyQt.QtCore import *  # type: ignore
    from qgis.PyQt.QtCore import Qt
    from qgis.PyQt.QtGui import *  # type: ignore
    from qgis.PyQt.QtWidgets import *  # type: ignore
except ImportError:
    from PyQt6.QtCore import *  # type: ignore
    from PyQt6.QtCore import Qt
    from PyQt6.QtGui import *  # type: ignore
    from PyQt6.QtWidgets import *  # type: ignore


def exec_dialog(dialog) -> int:
    """Execute a modal Qt6 dialog."""
    return dialog.exec()


def exec_menu(menu, *args):
    """Execute a Qt6 popup menu."""
    return menu.exec(*args)