import sys
import platform
from packaging import version

if sys.platform == 'darwin':
    if version.Version(platform.mac_ver()[0]) < version.Version("10.12"):
        raise RuntimeError("Only supports macOS 10.12 (Sierra) and higher")
    from qt_modern_window.macos.widgets import QModernMainWindow, QModernDialog, QModernWindow

elif sys.platform == 'win32':
    if version.Version(platform.win32_ver()[0]) < version.Version("10"):
        raise RuntimeError("Only supports Windows 10 and higher")
    from qt_modern_window.windows.widgets import QModernMainWindow, QModernDialog, QModernWindow