class Keywords:
    """List of keywords for each function which is condition matched in the main module.

    >>> Keywords

    """

    @staticmethod
    def date() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['date']

    @staticmethod
    def time() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['time']

    @staticmethod
    def weather() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['weather', 'temperature']

    @staticmethod
    def system_info() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['configuration']

    @staticmethod
    def ip_info() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['address']

    @staticmethod
    def webpage() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['website', 'webpage', 'web page', '.']

    @staticmethod
    def wikipedia() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['wikipedia', 'info', 'information']

    @staticmethod
    def news() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['news']

    @staticmethod
    def report() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['report']

    @staticmethod
    def robinhood() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['robinhood', 'investment', 'portfolio', 'summary']

    @staticmethod
    def apps() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['launch']

    @staticmethod
    def repeat() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['repeat', 'train']

    @staticmethod
    def chatbot() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['chat', 'chatbot', 'chatter']

    @staticmethod
    def location() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['location', 'where am i']

    @staticmethod
    def locate() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['locate', 'where is my', "where's my"]

    @staticmethod
    def music() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['music', 'songs', 'play']

    @staticmethod
    def gmail() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['email', 'mail', 'emails', 'mails']

    @staticmethod
    def meaning() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['meaning', 'meanings', 'dictionary', 'definition']

    @staticmethod
    def create_db() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['create a new database', 'create a new data base', 'create a database', 'create a data base']

    @staticmethod
    def add_todo() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['add', 'update']

    @staticmethod
    def delete_todo() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['remove', 'delete']

    @staticmethod
    def delete_db() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['delete database', 'delete data base', 'delete my database', 'delete my data base']

    @staticmethod
    def list_todo() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['plan']

    @staticmethod
    def distance() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['far', 'distance', 'miles']

    @staticmethod
    def avoid() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['sun', 'moon', 'mercury', 'venus', 'earth', 'mars', 'jupiter', 'saturn', 'uranus', 'neptune', 'pluto',
                'a.m.', 'p.m.', 'update my to do list', 'launch', 'safari', 'body', 'human', 'centimeter', 'server',
                'cloud']

    @staticmethod
    def geopy() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['where is', "where's", 'which city', 'which state', 'which country', 'which county']

    @staticmethod
    def directions() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['take me', 'get directions']

    @staticmethod
    def alarm() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['alarm', 'wake me']

    @staticmethod
    def kill_alarm() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['stop alarm', 'stop my alarm', 'turn off my alarm', 'turn my alarm off', 'stop another alarm']

    @staticmethod
    def reminder() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['remind', 'reminder']

    @staticmethod
    def google_home() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['google home', 'googlehome']

    @staticmethod
    def jokes() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['joke', 'jokes', 'make me laugh']

    @staticmethod
    def notes() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['notes', 'note']

    @staticmethod
    def github() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['git', 'github', 'clone', 'GitHub']

    @staticmethod
    def txt_message() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['message', 'text', 'messages']

    @staticmethod
    def google_search() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['google search']

    @staticmethod
    def tv() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['tv', 'television']

    @staticmethod
    def volume() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['volume', 'mute']

    @staticmethod
    def face_detection() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['face', 'recognize', 'who am i', 'detect', 'facial', 'recognition', 'detection']

    @staticmethod
    def speed_test() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['speed', 'fast']

    @staticmethod
    def bluetooth() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['connect', 'disconnect', 'bluetooth']

    @staticmethod
    def brightness() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['brightness', 'bright', 'dim']

    @staticmethod
    def lights() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['lights', 'hallway', 'kitchen', 'living room', 'bedroom']

    @staticmethod
    def guard_enable() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['take care', 'heading out', 'keep an eye', 'turn on security mode', 'enable security mode']

    @staticmethod
    def guard_disable() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ["I'm back", 'I am back', 'turn off security mode', 'disable security mode']

    @staticmethod
    def flip_a_coin() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['head', 'tail', 'flip']

    @staticmethod
    def facts() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['fact', 'facts']

    @staticmethod
    def meetings() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['meeting', 'appointment', 'schedule']

    @staticmethod
    def voice_changer() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['voice', 'module', 'audio']

    @staticmethod
    def system_vitals() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['vitals', 'statistics', 'readings', 'stats']

    @staticmethod
    def personal_cloud() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['personal cloud', 'private cloud', 'personal server', 'private server']

    @staticmethod
    def ok() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['yeah', 'yes', 'yep', 'go ahead', 'proceed', 'continue', 'carry on', 'please', 'keep going']

    @staticmethod
    def restart() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['restart', 'reboot']

    @staticmethod
    def exit() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['exit', 'quit', 'no', 'nope', 'thanks', 'thank you', 'Xzibit', 'bye', 'good bye',
                'see you later', 'talk to you later', 'activate sentry mode', "that's it", 'that is it']

    @staticmethod
    def sleep() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['exit', 'quit', 'lock', 'sleep', 'Xzibit', 'activate sentry mode']

    @staticmethod
    def kill() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['kill', 'terminate yourself', 'stop running']

    @staticmethod
    def shutdown() -> list:
        """Words to match the given statement.

        Returns:
            list:
            List of words for the function name.

        """
        return ['shutdown', 'shut down', 'terminate']


if __name__ == '__main__':
    # TODO: begin diagnostics to use dictionaries instead of long nested if statements in conditions() in jarvis.py
    """Since Python stores the methods and other attributes of a class in a dictionary, which is unordered,
    looping through and executing all of the functions in python is impossible.
    Since we don't care about order, we can use the class's __dict__ and iter through it's items"""
    funcs = 0
    for method_name, return_value in Keywords.__dict__.items():
        if type(return_value) == staticmethod:
            funcs += 1
    print(funcs)
    # prove time complexity
    from timeit import timeit

    print(f"Accessing the class directly for {funcs} times:")
    print(timeit(f"""
from helper_functions.keywords import Keywords
for _ in range({funcs}):
    Keywords.__dict__.items()"""))
    print(f"Assigning the class to a variable and then access it {funcs} times:")
    print(timeit(f"""
from helper_functions.keywords import Keywords
keywords = Keywords()
for _ in range({funcs}):
    keywords.__dict__.items()"""))
