<% const modal = locals.modal || {}; const id = modal.id || uniqueId('modal'); %> <% if (locals.buttons) { %> <% locals.buttons.forEach(function(button) { %> <%- include('../../../button/template/ejs/button', { button: {...button}}) %> <% }); %> <% } else { %> <%- include('../../template/ejs/button.ejs', {modalButton: { label: modal.label, id: id }}) %> <% } %> <%- include('../../template/ejs/modal.ejs', {modal: { ...modal, id: id }}) %>