<% extends 'layout.html' %>

<% block container %>
<div id="mailpoet_automation_editor" class="edit-site"></div>
<% endblock %>

<% block after_javascript %>
<script type="text/javascript">
  var mailpoet_automation_api = <%= json_encode(api) %>;
  var mailpoet_user_roles = <%= json_encode(user_roles) %>;
  var mailpoet_segments = <%= json_encode(segments) %>;
  var mailpoet_automation_context = <%= json_encode(context) %>;
  var mailpoet_automation_workflow = <%= workflow ? json_encode(workflow) : 'undefined' %>;
</script>
<%= javascript('automation_editor.js')%>
<% endblock %>

<% block after_css %>
<%= stylesheet('mailpoet-automation-editor.css') %>
<% endblock %>
