{% stories forms with { title: 'Atoms/Forms' } %}
  {% story checkboxes with {
    name: 'Multiple checkboxes',
  } %}
    {% set options = [
      {
        title: 'Option 1',
        checked: 'checked',
      },
      {
        title: 'Option 2',
        checked: 'checked',
        disabled: true,
      },
      {
        title: 'Option 3',
        checked: 'checked',
        disabled: true,
      },
      {
        title: 'Option 4',
      },
      {
        title: 'Option 5',
      }
    ] %}
    <form>
      {% set fieldset_content %}
        {% set children %}
          {% for option in options %}
            {% embed "@rocketship-theme-starter-atoms/05-forms/form-element/form-element.html.twig" with {
              type: 'checkbox',
            } %}
              {% block form_element_content %}
                {% include "@rocketship-theme-starter-atoms/05-forms/input/input.html.twig" with {
                  attributes: create_attribute({
                    id: option.title|clean_class,
                    type: 'checkbox',
                    checked: option.checked,
                    disabled: option.disabled,
                  }),
                } %}
                {% include "@rocketship-theme-starter-atoms/05-forms/form-label/form-element-label.html.twig" with {
                  title: option.title,
                  attributes: create_attribute({ for: option.title|clean_class }),
                  required: option.required,
                  title_display: option.title_display,
                } %}
              {% endblock form_element_content %}
            {% endembed %}
          {% endfor %}
        {% endset %}

        {% include "@rocketship-theme-starter-atoms/05-forms/checkbox/checkboxes.html.twig" with {
          children,
        } %}
      {% endset %}

      {% include "@rocketship-theme-starter-atoms/05-forms/fieldset/fieldset.html.twig" with {
        attributes: create_attribute({ class: ['checkboxes--wrapper'] }),
        children: fieldset_content,
        legend: {
          title: 'Checkboxes',
        },
      } %}
    </form>
  {% endstory %}
{% endstories %}
