<div class="modal-outer-container">
  <div class="modal-middle-container">
    <div class="modal-inner-container">
      <div class="modal-header">
        {{#if dismissable}}
          {{d-button icon="times" action=(route-action "closeModal") class="btn btn-flat modal-close close" }}
        {{/if}}

        {{#if panels}}
          <ul class="modal-tabs">
            {{#each panels as |panel|}}
              {{modal-tab
                panel=panel
                panelsLength=panels.length
                selectedPanel=selectedPanel
                onSelectPanel=onSelectPanel}}
            {{/each}}
          </ul>
        {{else}}
          <div class="title">
            <h3>{{title}}</h3>

            {{#if subtitle}}
              <p>{{subtitle}}</p>
            {{/if}}
          </div>
        {{/if}}
      </div>

      <div id='modal-alert'></div>

      {{yield}}

      {{#each errors as |error|}}
        <div class="alert alert-error">
          <button class="close" data-dismiss="alert">×</button>
          {{error}}
        </div>
      {{/each}}
    </div>
  </div>
</div>
