# By: Riasat Ullah
# This file contains test data for live call routing.

from constants import static_vars, var_names
from system_tests.test_data import test_data_services
from system_tests import test_tools

call_routing_basic_list = [['Customer Support Call Routing', test_tools.get_dummy_reference_id()],
                           ['Operations Direct Routing', test_tools.get_dummy_reference_id()]]

call_routing_list = [
    {
        var_names.call_routing_ref_id: call_routing_basic_list[0][1],
        var_names.routing_name: call_routing_basic_list[0][0],
        var_names.description: 'This routing allows customer calls to be routed to the ' +
                               'correct on-call personnel according to weekday schedules.',
        var_names.iso_country_code: 'US',
        var_names.phone: '+18805608971',
        var_names.phone_type: static_vars.toll_free,
        var_names.associated_services: [test_data_services.services_basic_list[0],
                                        test_data_services.services_basic_list[2]]
    },
    {
        var_names.call_routing_ref_id: call_routing_basic_list[1][1],
        var_names.routing_name: call_routing_basic_list[1][0],
        var_names.description: 'Number to directly contact operations team for urgent matters.',
        var_names.iso_country_code: 'US',
        var_names.phone: '+19877654321',
        var_names.phone_type: static_vars.local,
        var_names.associated_services: [test_data_services.services_basic_list[1]]
    },
]


call_routing_details = {
    call_routing_list[0][var_names.call_routing_ref_id]: {
        var_names.call_routing_ref_id: call_routing_list[0][var_names.call_routing_ref_id],
        var_names.routing_name: call_routing_list[0][var_names.routing_name],
        var_names.description: call_routing_list[0][var_names.description],
        var_names.iso_country_code: call_routing_list[0][var_names.iso_country_code],
        var_names.phone: call_routing_list[0][var_names.phone],
        var_names.phone_type: call_routing_list[0][var_names.phone_type],
        var_names.greeting_text: "Thank you for calling Apollo's customer support line. " +
                                 "Please press 1 to talk to a sales representative. " +
                                 "Please press 2 to talk to for technical support. ",
        var_names.greeting_audio_filename: None,
        var_names.greeting_audio_url: None,
        var_names.ending_text: "We are sorry. None of our representatives are available now. " +
                               "Please leave us a voice mail and we will get back to you as soon as we can.",
        var_names.ending_audio_filename: None,
        var_names.ending_audio_url: None,
        var_names.default_forwarding_service: call_routing_list[0][var_names.associated_services][0][1],
        var_names.option_forwarding_services: {1: call_routing_list[0][var_names.associated_services][0][1],
                                               2: call_routing_list[0][var_names.associated_services][1][1]},
        var_names.text_language: 'en',
        var_names.is_male_voice: False,
        var_names.max_forwarding_users: 5,
        var_names.forwarding_timeout: 15,
        var_names.urgency_level: static_vars.critical_urgency,
        var_names.block_numbers: ['+19187654333', '+19891236776'],
        var_names.show_caller_id: True,
        var_names.resolve_answered_calls: True,
        var_names.resolve_unanswered_calls: True,
        var_names.to_alert: True,
        var_names.record_voicemail: True,
        var_names.record_call: False,
        var_names.prompt_call_acceptance: True,
        var_names.prompt_format: "Call from {{ caller_group }}. Press any key to accept the call.",
        var_names.incident_title_format: "Phone query from {{ caller_name }} ({{ caller_group }})"
    },
    call_routing_list[1][var_names.call_routing_ref_id]: {
        var_names.call_routing_ref_id: call_routing_list[1][var_names.call_routing_ref_id],
        var_names.routing_name: call_routing_list[1][var_names.routing_name],
        var_names.description: call_routing_list[1][var_names.description],
        var_names.iso_country_code: call_routing_list[1][var_names.iso_country_code],
        var_names.phone: call_routing_list[1][var_names.phone],
        var_names.phone_type: call_routing_list[1][var_names.phone_type],
        var_names.greeting_text: None,
        var_names.greeting_audio_filename: 'Greeting Audio.mp3',
        # var_names.greeting_audio_url: 'http://127.0.0.1:8000/client/files/audio/live-call-routing/new_ref_id/greeting',
        var_names.greeting_audio_url: 'https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3',
        var_names.ending_text: None,
        var_names.ending_audio_filename: 'EndingAudio.mp3',
        var_names.ending_audio_url: 'https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3',
        var_names.default_forwarding_service: call_routing_list[1][var_names.associated_services][0][1],
        var_names.option_forwarding_services: None,
        var_names.text_language: 'en',
        var_names.is_male_voice: False,
        var_names.max_forwarding_users: 3,
        var_names.forwarding_timeout: 10,
        var_names.urgency_level: static_vars.critical_urgency,
        var_names.block_numbers: None,
        var_names.show_caller_id: False,
        var_names.resolve_answered_calls: False,
        var_names.resolve_unanswered_calls: False,
        var_names.to_alert: True,
        var_names.record_voicemail: False,
        var_names.record_call: True,
        var_names.prompt_call_acceptance: False,
        var_names.prompt_format: None,
        var_names.incident_title_format: None
    }
}


searched_phone_numbers = [
    ['+1 (800)-866-7786', '+18008667786'],
    ['+1 (800)-800-1212', '+18008001212'],
    ['+1 (800)-999-1111', '+18009991111'],
    ['+1 (800)-888-0561', '+18008880561'],
    ['+1 (800)-987-9871', '+18009879871']
]


allowed_live_call_routing_countries = [
    'AR', 'AT', 'AU', 'BA', 'BB', 'BE', 'BG', 'BJ', 'BR', 'BW', 'CA', 'CH', 'CL', 'CO', 'CZ',
    'DE', 'DK', 'DO', 'DZ', 'EC', 'EE', 'FI', 'FR', 'GB', 'GD', 'GE', 'GH', 'GN', 'GR', 'HK',
    'HR', 'HU', 'ID', 'IE', 'IL', 'IS', 'IT', 'JM', 'JP', 'KE', 'KY', 'LT', 'LU', 'ML', 'MO',
    'MU', 'MX', 'NL', 'NZ', 'PA', 'PE', 'PH', 'PL', 'PR', 'PT', 'RO', 'SD', 'SE', 'SG', 'SI',
    'SK', 'SV', 'TH', 'TN', 'TT', 'UG', 'US', 'VE', 'VI', 'VN', 'ZA'
]
