# -*- coding: utf-8 -*-
"""
/***************************************************************************
 TreeEyed
                                 A QGIS plugin
 TreeEyed
 Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
                             -------------------
        begin                : 2024-05-08
        copyright            : (C) 2024 by Andres Felipe Ruiz-Hurtado, Tropical Forages Program CIAT
        email                : a.f.ruiz@cgiar.org, anfruizhu@unal.edu.co
        git sha              : $Format:%H$
 ***************************************************************************/
"""

# noinspection PyPep8Naming
def classFactory(iface):  # pylint: disable=invalid-name
    """Load TreeEyed class from file TreeEyed.

    :param iface: A QGIS interface instance.
    :type iface: QgsInterface
    """

    # check packages
    #from .process.gui_utils import installer
    #res = installer.check_packages(iface)

    res = True

    # Add dependencies folder to path
    import os
    import sys
    plugin_dir = os.path.dirname(__file__)
    deps_path = os.path.join(plugin_dir, "dependencies")

    if deps_path not in sys.path:
        sys.path.insert(0, deps_path)

    # Load main class of the plugin
    if res:
        from .tree_eyed import TreeEyed
        return TreeEyed(iface)
    else:
        from .tree_eyed_dummy import TreeEyedDummy
        return TreeEyedDummy(iface)
