import os
from os import environ

# if you set a property in SESSION_CONFIG_DEFAULTS, it will be inherited by all configs
# in SESSION_CONFIGS, except those that explicitly override it.
# the session config can be accessed from methods in your apps as self.session.config,
# e.g. self.session.config['participation_fee']

SESSION_CONFIG_DEFAULTS = {
    'real_world_currency_per_point': 0.00,
    'participation_fee': 1.90,
    'doc': "",

    'mturk_hit_settings':
{
    'keywords': ['bonus', 'study', 'payment', 'economics', 'decision making'],
    'title': 'An Experiment: Decision Making in Sequence',
    'description': "This HIT is an online experiment that is a part of an academic research on decision making in"
                   " sequence.\n"
                   " You will guarantee your minimum payment of $1.90 by completing this HIT as best as you can."
                   " The bonus consists of two payments:\n"
                   " 1) There are 4 comprehension questions and each correct answer is worth $0.10 (max $0.40).\n"
                   " 2) Performance-based bonus of $1.50 depends on the choices you make in the experiment in"
                   " the way explained in the instructions. Thus, you should read them carefully"
                   " Overall, your earnings for this HIT could be as high as $3.80 for roughly 10-12 minutes of work.",
    'frame_height': 500,
    'template': 'global/MTurkPreview.html',
    'minutes_allotted_per_assignment': 30,
    'expiration_hours': 168,
    'grant_qualification_id': '3S5PCI7O9N97S250F2J7IFGH5UQP4C',
    'qualification_requirements':
        [{
            'QualificationTypeId': "3S5PCI7O9N97S250F2J7IFGH5UQP4C",
            'Comparator': "DoesNotExist",
        },
        {
            'QualificationTypeId': "00000000000000000071",
            'Comparator': "EqualTo",
            'LocaleValues': [{'Country': "US"}]
        },
        {
            'QualificationTypeId': "00000000000000000071",
            'Comparator': "EqualTo",
            'LocaleValues': [{'Country': "UK"}]
        },
        {
            'QualificationTypeId': "00000000000000000071",
            'Comparator': "EqualTo",
            'LocaleValues': [{'Country': "AU"}]
        },
        {
            'QualificationTypeId': "00000000000000000071",
            'Comparator': "EqualTo",
            'LocaleValues': [{'Country': "GB"}]
        },
        {
            'QualificationTypeId': "00000000000000000071",
            'Comparator': "EqualTo",
            'LocaleValues': [{'Country': "CA"}]
        },
        {
            'QualificationTypeId': "00000000000000000071",
            'Comparator': "EqualTo",
            'LocaleValues': [{'Country': "NZ"}]
        },
        {
            'QualificationTypeId': "00000000000000000040",
            'Comparator': "GreaterThanOrEqualTo",
            'LocaleValues': [3000]
        },
        {
            'QualificationTypeId': "000000000000000000L0",
            'Comparator': "GreaterThanOrEqualTo",
            'LocaleValues': [98]
        },
        ]
}
}

CSRF_TRUSTED_ORIGINS = ['mturk.com', 'worker.mturk.com', 'workersandbox.mturk.com']

SESSION_CONFIGS = [
    {
        'name': 'urns',
        'num_demo_participants': 10,
        'app_sequence': ['urns_intro', 'urns1', 'urns2', 'urns_final'],
        'use_browser_bots': False,
    },

    # other session configs go here ...
]
# see the end of this file for the inactive session configs

DEBUG = False

# ISO-639 code
# for example: de, fr, ja, ko, zh-hans
LANGUAGE_CODE = 'en'

# e.g. EUR, GBP, CNY, JPY
REAL_WORLD_CURRENCY_CODE = 'USD'
USE_POINTS = False #changed from True

ROOMS = [
    {
        'name': 'choices',
        'display_name': 'Experiment',
        'use_secure_urls': False,
    }
]

ADMIN_USERNAME = 'admin'
# for security, best to set admin password in an environment variable
ADMIN_PASSWORD = 'alfafoxtrot'

AUTH_LEVEL = 'STUDY'

AWS_ACCESS_KEY_ID = 'AKIAISZ75SFWPCMH7QFQ' #environ.get('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = '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' #environ.get('AWS_SECRET_ACCESS_KEY')


DEMO_PAGE_INTRO_HTML = """
This experiment has been created by Vytautas Silinskas. You can entries to this list in settings.py.
"""

# don't share this with anybody.
SECRET_KEY = '_phu5@74wmi7a+fe271lod&7cj=jc&!k9ub*(32471yipg@!7e'

# if an app is included in SESSION_CONFIGS, you don't need to list it here
INSTALLED_APPS = ['otree']
