# Path: vii/AbstractAction.py
# class AbstractAction:
#     def act(self, callback = None): pass
# 
#     def finish(self):
#         self.dispatcher.logHistory()
#         self.dispatcher.reset()
# 
#     def skipToIdle(self):
#         self.finish()
#         return "normal", self.actionManager.action("normal", "idle")
# 
#     def moveAndFinshToIdle(self, motion):
#         if motion: motion = motion.forceLimits()
#         self.cursor.move(motion)
#         self.finish()
#         return "normal", self.actionManager.action("normal", "idle")
# 
#     def deleteAndRegister(self, motion):
#         string = self.buffer.delete(motion)
#         self.registerManager.shift(string, motion.isLines())
# 
# Path: vii/Range.py
# class Position(Range):
#     def __init__(self, x, y):
#         super().__init__(x, y, isPosition = True)


from .Logger import *
from .AbstractAction import AbstractAction
from .Range import Position
import importlib

class DummyAction(AbstractAction):

    def act(self, dummyCallback = None):
        return "normal", self.actionManager.action("normal", "idle")

class ActionManager:

    def __init__(self):
        self.dispatcher = None
        self.windowManager =  None
        self.registerManager = None
        self.actionMaps = dict()

    def addMap(self, mode, map):

# Path: vii/AbstractAction.py
# class AbstractAction:
#     def act(self, callback = None): pass
# 
#     def finish(self):
#         self.dispatcher.logHistory()
#         self.dispatcher.reset()
# 
#     def skipToIdle(self):
#         self.finish()
#         return "normal", self.actionManager.action("normal", "idle")
# 
#     def moveAndFinshToIdle(self, motion):
#         if motion: motion = motion.forceLimits()
#         self.cursor.move(motion)
#         self.finish()
#         return "normal", self.actionManager.action("normal", "idle")
# 
#     def deleteAndRegister(self, motion):
#         string = self.buffer.delete(motion)
#         self.registerManager.shift(string, motion.isLines())
# 
# Path: vii/Range.py
# class Position(Range):
#     def __init__(self, x, y):
#         super().__init__(x, y, isPosition = True)


# Path: vii/ActionManager.py
from .Logger import *
from .AbstractAction import AbstractAction
from .Range import Position
import importlib


class DummyAction(AbstractAction):

    def act(self, dummyCallback = None):
        return "normal", self.actionManager.action("normal", "idle")

class ActionManager:

    def __init__(self):
        self.dispatcher = None
        self.windowManager =  None
        self.registerManager = None
        self.actionMaps = dict()

    def addMap(self, mode, map):

        self.actionMaps[mode] = self.parseMap(map)