from branca.element import Template, MacroElement
def get_legend_macro(show_unverified):
labels_unverified_requests = _(
"""
Rescue
Medical Assistance
Shelter
Food & Water
Dangers
Done
Partial
Planned
"""
)
labels_verified = _(
"""
High Emergency
Medium Emergency
Low Emergency
Done
Partial
Planned
"""
)
template_1 = """
{% macro html(this, kwargs) %}
jQuery UI Draggable - Default functionality
{% endmacro %}"""
legend_macro = MacroElement()
legend_macro._template = Template(
template_1 + (labels_unverified_requests if show_unverified else labels_verified) + template_2
)
return legend_macro
__all__ = ["get_legend_macro"]