from typing import Union
import secrets

# Translated list thanks to ChatGPT
thanks_array: list = [
    ("Afghanistan", "تشکر"),
    ("Albania", "Faleminderit"),
    ("Algeria", "شكرا"),
    ("Andorra", "Gràcies"),
    ("Angola", "Obrigado"),
    ("Antigua and Barbuda", "Thank you"),
    ("Argentina", "Gracias"),
    ("Armenia", "Շնորհակալ եմ"),
    ("Australia", "Thank you"),
    ("Austria", "Danke"),
    ("Azerbaijan", "Təşəkkür edirəm"),
    ("Bahamas", "Thank you"),
    ("Bahrain", "شكرا"),
    ("Bangladesh", "ধন্যবাদ"),
    ("Barbados", "Thank you"),
    ("Belarus", "Дзякуй"),
    ("Belgium", "Dank u"),
    ("Belize", "Thank you"),
    ("Benin", "Merci"),
    ("Bhutan", "བཀྲ་ཤིས་བདག"),
    ("Bolivia", "Gracias"),
    ("Bosnia and Herzegovina", "Hvala"),
    ("Botswana", "Thank you"),
    ("Brazil", "Obrigado"),
    ("Brunei", "Terima kasih"),
    ("Bulgaria", "Благодаря"),
    ("Burkina Faso", "Merci"),
    ("Burundi", "Merci"),
    ("Cabo Verde", "Obrigado"),
    ("Cambodia", "សូមអរគុណ"),
    ("Cameroon", "Merci"),
    ("Canada", "Thank you"),
    ("Central African Republic", "Merci"),
    ("Chad", "Merci"),
    ("Chile", "Gracias"),
    ("China", "谢谢"),
    ("Colombia", "Gracias"),
    ("Comoros", "Shukran"),
    ("Congo, Republic of the", "Merci"),
    ("Congo, Democratic Republic of the", "Merci"),
    ("Costa Rica", "Gracias"),
    ("Cote d'Ivoire", "Merci"),
    ("Croatia", "Hvala"),
    ("Cuba", "Gracias"),
    ("Cyprus", "Ευχαριστώ"),
    ("Czech Republic", "Děkuji"),
    ("Denmark", "Tak"),
    ("Djibouti", "Merci"),
    ("Dominica", "Thank you"),
    ("Dominican Republic", "Gracias"),
    ("Ecuador", "Gracias"),
    ("Egypt", "شكرا"),
    ("El Salvador", "Gracias"),
    ("Equatorial Guinea", "Gracias"),
    ("Eritrea", "ኣመልካችን"),
    ("Estonia", "Tänan"),
    ("Eswatini", "Ngiyabonga"),
    ("Ethiopia", "አመሰግናለሁ"),
    ("Fiji", "Vinaka"),
    ("Finland", "Kiitos"),
    ("France", "Merci"),
    ("Gabon", "Merci"),
    ("Gambia", "Thank you"),
    ("Georgia", "მადლიანი"),
    ("Germany", "Danke"),
    ("Ghana", "Medaase"),
    ("Greece", "Ευχαριστώ"),
    ("Grenada", "Thank you"),
    ("Guatemala", "Gracias"),
    ("Guinea", "Merci"),
    ("Guinea-Bissau", "Obrigado"),
    ("Guyana", "Thank you"),
    ("Haiti", "Mèsi"),
    ("Honduras", "Gracias"),
    ("Hungary", "Köszönöm"),
    ("Iceland", "Takk"),
    ("India", "धन्यवाद"),
    ("Indonesia", "Terima kasih"),
    ("Iran", "سپاسگزارم"),
    ("Iraq", "شكرا"),
    ("Ireland", "Thank you"),
    ("Israel", "תודה"),
    ("Italy", "Grazie"),
    ("Jamaica", "Thank you"),
    ("Japan", "ありがとうございます"),
    ("Jordan", "شكرا"),
    ("Kazakhstan", "Рахмет"),
    ("Kenya", "Asante"),
    ("Kiribati", "Kam rabwa"),
    ("Kosovo", "Faleminderit"),
    ("Kuwait", "شكرا"),
    ("Kyrgyzstan", "Рахмат"),
    ("Laos", "ຂອບ​ໃຈ"),
    ("Latvia", "Paldies"),
    ("Lebanon", "شكرا"),
    ("Lesotho", "Kea leboha"),
    ("Liberia", "Thank you"),
    ("Libya", "شكرا"),
    ("Liechtenstein", "Danke"),
    ("Lithuania", "Ačiū"),
    ("Luxembourg", "Merci"),
    ("Madagascar", "Misaotra"),
    ("Malawi", "Zikomo"),
    ("Malaysia", "Terima kasih"),
    ("Maldives", "Shukuriyya"),
    ("Mali", "Merci"),
    ("Malta", "Grazzi"),
    ("Marshall Islands", "Thank you"),
    ("Mauritania", "شكرا"),
    ("Mauritius", "Thank you"),
    ("Mexico", "Gracias"),
    ("Micronesia", "Thank you"),
    ("Moldova", "Mulțumesc"),
    ("Monaco", "Merci"),
    ("Mongolia", "Баярлалаа"),
    ("Montenegro", "Hvala"),
    ("Morocco", "شكرا"),
    ("Mozambique", "Obrigado"),
    ("Myanmar", "ကျေးဇူးတင်ပါတယ်"),
    ("Namibia", "Thank you"),
    ("Nauru", "Thank you"),
    ("Nepal", "धन्यवाद"),
    ("Netherlands", "Dank u"),
    ("New Zealand", "Thank you"),
    ("Nicaragua", "Gracias"),
    ("Niger", "Merci"),
    ("Nigeria", "Thank you"),
    ("North Korea", "감사합니다"),
    ("North Macedonia", "Благодарам"),
    ("Norway", "Takk"),
    ("Oman", "شكرا"),
    ("Pakistan", "شکریہ"),
    ("Palau", "Alii"),
    ("Palestine", "شكرا"),
    ("Panama", "Gracias"),
    ("Papua New Guinea", "Thank you"),
    ("Paraguay", "Gracias"),
    ("Peru", "Gracias"),
    ("Philippines", "Salamat"),
    ("Poland", "Dziękuję"),
    ("Portugal", "Obrigado"),
    ("Qatar", "شكرا"),
    ("Romania", "Mulțumesc"),
    ("Russia", "Спасибо"),
    ("Rwanda", "Murakoze"),
    ("Saint Kitts and Nevis", "Thank you"),
    ("Saint Lucia", "Thank you"),
    ("Saint Vincent and the Grenadines", "Thank you"),
    ("Samoa", "Fa'afetai"),
    ("San Marino", "Grazie"),
    ("Sao Tome and Principe", "Obrigado"),
    ("Saudi Arabia", "شكرا"),
    ("Senegal", "Merci"),
    ("Serbia", "Хвала"),
    ("Seychelles", "Thank you"),
    ("Sierra Leone", "Thank you"),
    ("Singapore", "谢谢"),
    ("Slovakia", "Ďakujem"),
    ("Slovenia", "Hvala"),
    ("Solomon Islands", "Thank you"),
    ("Somalia", "Mahadsanid"),
    ("South Africa", "Thank you"),
    ("South Korea", "감사합니다"),
    ("South Sudan", "Thank you"),
    ("Spain", "Gracias"),
    ("Sri Lanka", "ස්තූතියි"),
    ("Sudan", "شكرا"),
    ("Suriname", "Dank u"),
    ("Sweden", "Tack"),
    ("Switzerland", "Merci"),
    ("Syria", "شكرا"),
    ("Taiwan", "謝謝"),
    ("Tajikistan", "Раҳмат"),
    ("Tanzania", "Asante"),
    ("Thailand", "ขอบคุณ"),
    ("Timor-Leste", "Obrigadu"),
    ("Togo", "Merci"),
    ("Tonga", "Mālō"),
    ("Trinidad and Tobago", "Thank you"),
    ("Tunisia", "شكرا"),
    ("Turkey", "Teşekkür ederim"),
    ("Turkmenistan", "Sag bol"),
    ("Tuvalu", "Fakafetai"),
    ("Uganda", "Webale"),
    ("Ukraine", "Дякую"),
    ("United Arab Emirates", "شكرا"),
    ("United Kingdom", "Thank you"),
    ("United States of America", "Thank you"),
    ("Uruguay", "Gracias"),
    ("Uzbekistan", "Rahmat"),
    ("Vanuatu", "tankyu tumas"),
    ("Venezuela", "gracias"),
    ("Vietnam", "Cảm ơn"),
    ("Yemen", "shukran"),
    ("Zambia", "zikomo"),
    ("Zimbabwe", "tadzikamidza"),
    ("Tanganyika", "Asante sana"),
    # Ceased
    ("South Vietnam", "Cảm ơn"),
    ("North Yemen", "شكرا"),
    ("East Germany", "Danke"),
    ("Czechoslovakia", "Ďakujem"),
    ("Soviet Union", "Спасибо"),
    ("Yugoslavia", "Hvala"),
    ("Serbia and Montenegro", "Hvala"),
    # History ">1600"
    ("Abbasid Caliphate", "شكرا"),
    ("Ayyubid Dynasty", "شكرا"),
    ("Aztec Empire", "Gracias"),
    ("Byzantine Empire", "Ευχαριστώ"),
    ("Cahokia", "Miigwech"),
    ("Chola Dynasty", "நன்றி"),
    ("Delhi Sultanate", "شکریہ"),
    ("Empire of Ghana", "Meda wo ase"),
    ("Goryeo Dynasty", "감사합니다"),
    ("Inca Empire", "Sulpayki"),
    ("Kievan Rus", "Дякую"),
    ("Majapahit Empire", "Terima kasih"),
    ("Mali Empire", "ɛ ni sogoma"),
    ("Mongol Empire", "Баярлалаа"),
    ("Ottoman Empire", "Teşekkür ederim"),
    ("Sasanian Empire", "ممنون"),
    ("Vijayanagara Empire", "ಧನ್ಯವಾದಗಳು"),
    ("Yuan Dynasty", "谢谢"),
    ("Aksumite Empire", "አመሰግናለሁ"),
    ("Ancient Egypt", "ḥnṯrwy"),
    ("Angkor Empire", "អរគុណ"),
    ("Avar Khaganate", "Köszönöm"),
    ("Gupta Empire", "धन्यवाद"),
    ("Han Dynasty", "谢谢"),
    ("Hephthalite Empire", "ممنون"),
    ("Kushan Empire", "Баярлалаа"),
    ("Maurya Empire", "धन्यवाद"),
    ("Maya Civilization", "Matyox"),
    ("Parthian Empire", "متشکرم"),
    ("Ptolemaic Kingdom", "εὐχαριστώ"),
    ("Rome Empire", "Grazie"),
    ("Sasanian Empire", "ممنون"),
    ("Shang Dynasty", "谢谢"),
    ("Tang Dynasty", "谢谢"),
    ("Teotihuacan", "Tlazohcamati"),
    ("Vikings", "Takk"),
    ("Achaemenid Empire", "ممنون"),
    ("Ancient Greece", "ευχαριστώ"),
    ("Assyrian Empire", "ܝܘܚܢܢ"),
    ("Babylonian Empire", "ܝܘܚܢܢ"),
    ("Celtic Tribes", "Go raibh maith agat"),
    ("Etruscan Civilization", "Grazie"),
    ("Hittite Empire", "ممنون"),
    ("Inca Empire", "Sulpayki"),
    ("Minoan Civilization", "Ευχαριστώ"),
    ("Nubian Kingdoms", "متشکرم"),
    ("Olmec Civilization", "Matyox"),
    ("Persian Empire", "ممنون"),
    ("Phoenician Civilization", "תודה"),
    ("Roman Republic", "Grazie"),
    ("Shang Dynasty", "谢谢"),
    ("Sumerian Civilization", "واژه های خیر"),
    ("Tang Dynasty", "谢谢"),
    ("Vedic Period India", "धन्यवाद"),
]


def give_thanks(as_tuple: bool = False) -> Union[str, tuple]:
    """Returns translated "Thank You (Country)"

    Selects one randomply from a list of tuples using secrets package
    """
    thanks = secrets.choice(thanks_array)
    if not as_tuple:
        return "{} ({})".format(thanks[1], thanks[0])
    else:
        return thanks
