{% from "components/icon.html" import Icon %}

{% macro EmptyState(message, action_label, action_href, icon=None, sub_message=None, add_perms=True) -%}
  <div class='empty-state'>
    <p class='empty-state__message'>{{ message }}</p>

    {% if icon %}
      {{ Icon(icon) }}
    {% endif %}

    {% if sub_message %}
      <p class='empty-state__sub-message'>{{ sub_message }}</p>
    {% endif %}

    {% if add_perms and (action_href and action_label) %}
      <a href='{{ action_href }}' class='usa-button usa-button-big'>{{ action_label }}</a>
    {% endif %}

  </div>
{%- endmacro %}
