# Path: conf/api_example_conf.py

# 
# Path: conf/browser_os_name_conf.py
# def generate_configuration(browsers=browsers,firefox_versions=firefox_versions,chrome_versions=chrome_versions,safari_versions=safari_versions,
#                             os_list=os_list,windows_versions=windows_versions,os_x_versions=os_x_versions):
# 
# Path: conf/remote_credentials.py
# REMOTE_BROWSER_PLATFORM = "BS"
# USERNAME = "Enter your username"
# ACCESS_KEY = "Enter your access key"


import sys
import questionary
from clear_screen import clear
from conf import api_example_conf
from conf import browser_os_name_conf as conf
from conf import remote_credentials
                                   choices=["Mobile OS Name","Mobile OS Version",
                                   "Device Name","App Package","App Activity",
                                   "Set Remote credentials","Remote Flag status",
                                   "Testrail flag status","Tesults flag status",
                                   "App Name","App Path",
                                   "Revert back to default options",
                                   "Run","Exit"]).ask()

    return response

def ask_questions_api(api_url,session_flag=True):
    """This module asks the users questions to fetch the options
       they wish to run the api test with and stores their choices"""
    clear()
    while True:

        questionary.print("\nSeleted Options",style="bold fg:green")
        questionary.print("**********",style="bold fg:green")
        print("API URL:",api_url)
        print("Session flag status:",session_flag)
        questionary.print("**********",style="bold fg:green")
        response = get_user_response_api()
        clear()
        if response == "Session flag status":
            session_flag = get_sessionflag_status()

        if response == "API URL":
            api_url = get_api_url()

        if response == "Reset back to default settings":

# Path: conf/api_example_conf.py

# 
# Path: conf/browser_os_name_conf.py
# def generate_configuration(browsers=browsers,firefox_versions=firefox_versions,chrome_versions=chrome_versions,safari_versions=safari_versions,
#                             os_list=os_list,windows_versions=windows_versions,os_x_versions=os_x_versions):
# 
# Path: conf/remote_credentials.py
# REMOTE_BROWSER_PLATFORM = "BS"
# USERNAME = "Enter your username"
# ACCESS_KEY = "Enter your access key"


# Path: utils/interactive_mode.py
import sys
import questionary
from clear_screen import clear
from conf import api_example_conf
from conf import browser_os_name_conf as conf
from conf import remote_credentials

                                   choices=["Mobile OS Name","Mobile OS Version",
                                   "Device Name","App Package","App Activity",
                                   "Set Remote credentials","Remote Flag status",
                                   "Testrail flag status","Tesults flag status",
                                   "App Name","App Path",
                                   "Revert back to default options",
                                   "Run","Exit"]).ask()

    return response

def ask_questions_api(api_url,session_flag=True):
    """This module asks the users questions to fetch the options
       they wish to run the api test with and stores their choices"""
    clear()
    while True:

        questionary.print("\nSeleted Options",style="bold fg:green")
        questionary.print("**********",style="bold fg:green")
        print("API URL:",api_url)
        print("Session flag status:",session_flag)
        questionary.print("**********",style="bold fg:green")
        response = get_user_response_api()
        clear()
        if response == "Session flag status":
            session_flag = get_sessionflag_status()

        if response == "API URL":
            api_url = get_api_url()

        if response == "Reset back to default settings":

            api_url = api_example_conf.api_url