# Path: pytripgui/plan_executor/trip_config.py
# class Trip98ConfigModel:
#     def __init__(self):
#         self.name = ""
#         self.remote_execution = False
#         self.hlut_path = ""
#         self.dedx_path = ""
#         self.wdir_path = ""
#         self.trip_path = ""
# 
#         # remote execution
#         self.host_name = ""
#         self.user_name = ""
#         self.pkey_path = ""
#         self.password = ""
#         self.wdir_remote_path = ""


from pytripgui.plan_executor.trip_config import Trip98ConfigModel
from paramiko import ssh_exception
import logging
        import paramiko


logger = logging.getLogger(__name__)


class ConfigController:
    def __init__(self, model, view):
        self.model = model
        self.view = view
        self.user_clicked_save = False
        self._setup_callbacks()

        self.view.test_ssh_clicked_callback_connect(self._test_ssh)

        if not self.model:
            self.model = [Trip98ConfigModel()]

    def _setup_callbacks(self):
        self.view.set_ok_callback(self._save_and_exit)
        self.view.set_cancel_callback(self._exit)


# Path: pytripgui/plan_executor/trip_config.py
# class Trip98ConfigModel:
#     def __init__(self):
#         self.name = ""
#         self.remote_execution = False
#         self.hlut_path = ""
#         self.dedx_path = ""
#         self.wdir_path = ""
#         self.trip_path = ""
# 
#         # remote execution
#         self.host_name = ""
#         self.user_name = ""
#         self.pkey_path = ""
#         self.password = ""
#         self.wdir_remote_path = ""


# Path: pytripgui/config_vc/config_cont.py
from pytripgui.plan_executor.trip_config import Trip98ConfigModel
from paramiko import ssh_exception
import logging
        import paramiko



logger = logging.getLogger(__name__)


class ConfigController:
    def __init__(self, model, view):
        self.model = model
        self.view = view
        self.user_clicked_save = False
        self._setup_callbacks()

        self.view.test_ssh_clicked_callback_connect(self._test_ssh)

        if not self.model:
            self.model = [Trip98ConfigModel()]

    def _setup_callbacks(self):
        self.view.set_ok_callback(self._save_and_exit)
        self.view.set_cancel_callback(self._exit)


        self.view.add_button.emit_on_click(lambda: self.view.configs.append_element(Trip98ConfigModel(), ""))