{% load i18n %}
<div class="btn-group">
  <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    <i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add Components" %}
  </button>
  <ul class="dropdown-menu">
    {% if perms.virtualization.add_vminterface %}
      <li>
        <button type="submit" {% formaction %}="{% url 'virtualization:virtualmachine_bulk_add_vminterface' %}{% if url_params %}?{{ url_params.urlencode }}{% endif %}" class="dropdown-item">
          {% trans "Interfaces" %}
        </button>
      </li>
    {% endif %}
    {% if perms.virtualization.add_virtualdisk %}
      <li>
        <button type="submit" {% formaction %}="{% url 'virtualization:virtualmachine_bulk_add_virtualdisk' %}{% if url_params %}?{{ url_params.urlencode }}{% endif %}" class="dropdown-item">
          {% trans "Virtual Disks" %}
        </button>
      </li>
    {% endif %}
  </ul>
</div>
