# -*- coding: utf-8 -*-
# Copyright (c) 2016-present, CloudZero, Inc. All rights reserved.
# Licensed under the BSD-style license. See LICENSE file in the project root for full license information.

import random

reasons = {
    "good": [
        "Digital Manipulator within velocity parameters",
        "Solar flares properly aligned",
        "Fat electrons successfully purged from lines",
        "Successfully discharged static from plastic slide rules",
        "Tectonic stress nominal",
        "Earth's rotational speed in alignment",
        "Heavy gravity fluctuations",
        "Complete Transient Lockout averted",
        "CPU recalibration complete",
        "Disk and/or processor fire extinguished",
        "Additional computrons made available",
        "Endothermic recalibration complete",
        "Successfully reticulated splines",
        "Additional pylons constructed"
    ]
}


def get_reason(reason_type="good"):
    """
    All work and no play make Erik a dull boy.

    Provides very important reasons for why things happen

    Args:
        reason_type (str): Maps to various reason types, currently only "good"

    Returns:
        str: A Reason
    """
    rand = random.randint(0, (len(reasons[reason_type]) - 1))
    return reasons[reason_type][rand]
