{# LIBRARIES #}
{{ attach_library('ui_patterns/hamburger.hamburger_lib') }}

{# VARIABLES #}
{% set text = text|default("<span class='sr-only'>Toggle navigation</span><i class='fas fa-bars'></i>") %}
{% set class = class|default("lg-down icon-button") %}
{% set oid = oid|default("offcanvas-content") %}

{% set attributes = attributes|default(create_attribute())
  .setAttribute('id', 'ham')
  .setAttribute('tabindex', '-1')
  .setAttribute('aria-controls', oid)
  .setAttribute('data-bs-toggle', 'offcanvas')
  .setAttribute('data-bs-target', "##{ oid }")
%}

{# TEMPLATE #}
{% include "@atoms/form/button/button.twig" with {
  "text": text,
  "attributes": attributes,
  "class": class,
  "tag": 'button',
  "status": 'icon',
} only %}
