<!--
/**
 * Copyright (c) 2016 maijindou.com. All rights reserved.
 * See COPYING.txt for license details.
 */
-->

<aside
    class="modal-<%= data.type %> <%= data.modalClass %>
           <% if(data.innerScroll){ %><%= data.innerScrollClass %><% } %>"
    data-role="modal"
    data-type="<%= data.type %>"
    tabindex="0">
    <div data-role="focusable-start" tabindex="0"></div>
    <div class="modal-inner-wrap"
         data-role="focusable-scope">
        <header class="modal-header">
            <% if(data.title){ %>
            <h1 class="modal-title"
                data-role="title"><%= data.title %></h1>
            <% } %>
            <button
                class="action-close"
                data-role="closeBtn"
                type="button">
                <span><%= data.closeText %></span>
            </button>
            <% if(data.buttons.length > 0){ %>
            <div class="page-main-actions">
                <div class="page-actions">
                    <div class="page-actions-buttons">
                        <% _.each(data.buttons, function(button) { %>
                        <button
                            class="<%= button.class %>"
                            type="button"
                            data-role="action"><span><%= button.text %></span>
                        </button>
                        <% }); %>
                    </div>
                </div>
            </div>
            <% } %>
        </header>
        <div class="modal-content" data-role="content"></div>
    </div>
    <div data-role="focusable-end" tabindex="0"></div>
</aside>