# Path: resources/lib/system.py
# SYSTEM_VERSION = int(SYSTEM_BUILD_VERSION.split(".")[0])


import xbmcgui
from resources.lib.system import SYSTEM_VERSION


def dialog():
    return xbmcgui.Dialog()


def dtextviewer(heading, text):
    dialog().textviewer(heading, text)


def dyesno(heading='heading', message='message', yeslabel='yes', nolabel='no', autoclose=None):
    if autoclose is not None:
        autoclose = autoclose * 1000
    else:
        autoclose = 0
    if SYSTEM_VERSION > 18:
        return dialog().yesno(heading=heading, message=message, nolabel=nolabel, yeslabel=yeslabel,
                              autoclose=autoclose)
    return dialog().yesno(heading=heading, line1=message, nolabel=nolabel, yeslabel=yeslabel,
                          autoclose=autoclose)


def dok(heading, message=None):

# Path: resources/lib/system.py
# SYSTEM_VERSION = int(SYSTEM_BUILD_VERSION.split(".")[0])


# Path: resources/lib/gui/dialog.py
import xbmcgui
from resources.lib.system import SYSTEM_VERSION



def dialog():
    return xbmcgui.Dialog()


def dtextviewer(heading, text):
    dialog().textviewer(heading, text)


def dyesno(heading='heading', message='message', yeslabel='yes', nolabel='no', autoclose=None):
    if autoclose is not None:
        autoclose = autoclose * 1000
    else:
        autoclose = 0
    if SYSTEM_VERSION > 18:
        return dialog().yesno(heading=heading, message=message, nolabel=nolabel, yeslabel=yeslabel,
                              autoclose=autoclose)
    return dialog().yesno(heading=heading, line1=message, nolabel=nolabel, yeslabel=yeslabel,
                          autoclose=autoclose)


def dok(heading, message=None):

    if SYSTEM_VERSION > 18: