{# LIBRARIES #}
{{ attach_library('ui_patterns/tm_bits_more_less.tm_bits_more_less_lib') }}

{# VARIABLES #}
{% set content = content|default(false) %}
{% set more_str = more_str|default('More') %}
{% set less_str = less_str|default('Less') %}
{% set status = status|default('default') %}
{% set style = style|default('default') %}
{% set link_class = style == 'default' ? ('ml-c btn btn-' ~ status) : '' %}

{# TEMPLATE #}
{% if content %}
  <div class="ml-wrapper ml-{{ style }}">
    {% include "@molecules/tm-bs/collapse/collapse.twig" with {
      "label": more_str,
      "tgl_label": less_str,
      "content": content,
      "aiid": "ml-" ~ random(),
      "toggle": "chevron",
      "link_class": "ml-toggler belian " ~ link_class,
      "content_class": "ml-inner",
    } %}
  </div>
{% endif %}
