# Path: vimswitch/CommandLineParser.py
# def getCommandLineParser(app):
#     return app.get('commandLineParser', createCommandLineParser(app))
# 
# Path: vimswitch/InvalidArgsAction.py
# def createInvalidArgsAction(app):
#     return InvalidArgsAction()
# 
# Path: vimswitch/ShowCurrentProfileAction.py
# def createShowCurrentProfileAction(app):
#     settings = getSettings(app)
#     showCurrentProfileAction = ShowCurrentProfileAction(settings)
#     return showCurrentProfileAction
# 
# Path: vimswitch/ShowVersionAction.py
# def createShowVersionAction(app):
#     return ShowVersionAction()
# 
# Path: vimswitch/SwitchProfileAction.py
# def createSwitchProfileAction(app):
#     settings = getSettings(app)
#     profileCache = getProfileCache(app)
#     profileCopier = getProfileCopier(app)
#     profileRetriever = getProfileRetriever(app)
#     switchProfileAction = SwitchProfileAction(settings, profileCache, profileCopier, profileRetriever)
#     return switchProfileAction
# 
# Path: vimswitch/UpdateProfileAction.py
# def createUpdateProfileAction(app):
#     settings = getSettings(app)
#     switchProfileAction = createSwitchProfileAction(app)
#     updateProfileAction = UpdateProfileAction(settings, switchProfileAction)
#     return updateProfileAction


from .CommandLineParser import getCommandLineParser
from .InvalidArgsAction import createInvalidArgsAction
from .ShowCurrentProfileAction import createShowCurrentProfileAction
from .ShowVersionAction import createShowVersionAction
from .SwitchProfileAction import createSwitchProfileAction
from .UpdateProfileAction import createUpdateProfileAction


class ActionResolver:
    def __init__(self, app, commandLineParser):
        self.app = app
        self.commandLineParser = commandLineParser
        self.exitCode = 0

    def doActions(self):
        actionString = self.commandLineParser.action

        if actionString == 'switchProfile':
            action = createSwitchProfileAction(self.app)
            action.profile = self.commandLineParser.profile
        elif actionString == 'updateProfile':

# Path: vimswitch/CommandLineParser.py
# def getCommandLineParser(app):
#     return app.get('commandLineParser', createCommandLineParser(app))
# 
# Path: vimswitch/InvalidArgsAction.py
# def createInvalidArgsAction(app):
#     return InvalidArgsAction()
# 
# Path: vimswitch/ShowCurrentProfileAction.py
# def createShowCurrentProfileAction(app):
#     settings = getSettings(app)
#     showCurrentProfileAction = ShowCurrentProfileAction(settings)
#     return showCurrentProfileAction
# 
# Path: vimswitch/ShowVersionAction.py
# def createShowVersionAction(app):
#     return ShowVersionAction()
# 
# Path: vimswitch/SwitchProfileAction.py
# def createSwitchProfileAction(app):
#     settings = getSettings(app)
#     profileCache = getProfileCache(app)
#     profileCopier = getProfileCopier(app)
#     profileRetriever = getProfileRetriever(app)
#     switchProfileAction = SwitchProfileAction(settings, profileCache, profileCopier, profileRetriever)
#     return switchProfileAction
# 
# Path: vimswitch/UpdateProfileAction.py
# def createUpdateProfileAction(app):
#     settings = getSettings(app)
#     switchProfileAction = createSwitchProfileAction(app)
#     updateProfileAction = UpdateProfileAction(settings, switchProfileAction)
#     return updateProfileAction


# Path: vimswitch/ActionResolver.py
from .CommandLineParser import getCommandLineParser
from .InvalidArgsAction import createInvalidArgsAction
from .ShowCurrentProfileAction import createShowCurrentProfileAction
from .ShowVersionAction import createShowVersionAction
from .SwitchProfileAction import createSwitchProfileAction
from .UpdateProfileAction import createUpdateProfileAction



class ActionResolver:
    def __init__(self, app, commandLineParser):
        self.app = app
        self.commandLineParser = commandLineParser
        self.exitCode = 0

    def doActions(self):
        actionString = self.commandLineParser.action

        if actionString == 'switchProfile':
            action = createSwitchProfileAction(self.app)
            action.profile = self.commandLineParser.profile
        elif actionString == 'updateProfile':

            action = createUpdateProfileAction(self.app)