{% load report %}

/*
 * Status codes for the {{ label }} model.
 * Generated from the values specified in "status_codes.py"
 */
const {{ label }}Codes = {
    {% for entry in data %}
    '{{ entry.name }}': {
        key: {{ entry.key }},
        value: '{{ entry.label }}',{% if entry.color %}
        label: 'bg-{{ entry.color }}',{% endif %}
    },
    {% endfor %}
};

/*
 * Render the status for a {{ label }} object.
 * Uses the values specified in "status_codes.py"
 */
function {{ label }}StatusDisplay(key, options={}) {
    return renderStatusLabel(key, {{ label }}Codes, options);
}
