#!/usr/bin/env python3

from .easymain import *
from .easydialog import *
from .easytools import *
from .easydocs import LODocuments

from .easydrawpage import LOGalleries


def __getattr__(name):
    classes = {
        'active': LODocuments().active,
        'clipboard': ClipBoard,
        'cmd': LOMain.commands,
        'color': Color(),
        'config': Config,
        'dates': Dates,
        'dialog': LODialog,
        'dispatch': LOMain.dispatch,
        'docs': LODocuments(),
        'email': Email,
        'get_config': get_app_config,
        'filters': LOMain.filters,
        'fonts': LOMain.fonts,
        'hash': Hash,
        'inspect': LOInspect,
        'macro': Macro,
        'menus': LOMenus(),
        'paths': Paths,
        'url': URL,
        'selection': LODocuments().active.selection,
        'set_config': set_app_config,
        'shell': Shell,
        'shortcuts': LOShortCuts(),
        'timer': Timer,
        'galleries': LOGalleries()
    }

    if name in classes:
        return classes[name]

    raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
