<% extends 'layout.html' %>

<% block content %>
  <div id="settings_container"></div>

  <script type="text/javascript">
    <% autoescape 'js' %>
      var mailpoet_authorized_emails = <%= json_encode(authorized_emails) %>;
      var mailpoet_verified_sender_domains = <%= json_encode(verified_sender_domains) %>;
      var mailpoet_all_sender_domains = <%= json_encode(all_sender_domains) %>;
      var mailpoet_members_plugin_active = <%= json_encode(is_members_plugin_active == true) %>;
      var mailpoet_settings = <%= json_encode(settings) %>;
      var mailpoet_segments = <%= json_encode(segments) %>;
      var mailpoet_pages = <%= json_encode(pages) %>;
      var mailpoet_mss_key_valid = <%= json_encode(mss_key_valid) %>;
      var mailpoet_premium_key_valid = <%= json_encode(premium_key_valid) %>;
      var mailpoet_paths = <%= json_encode(paths) %>;
      var mailpoet_built_in_captcha_supported = <%= json_encode(built_in_captcha_supported == true) %>;
      var mailpoet_free_plan_url = "<%= add_referral_id('https://www.mailpoet.com/free-plan') %>";
      var mailpoet_current_user_email = "<%= current_user.user_email %>";
      var mailpoet_hosts = <%= json_encode(hosts) %>;
      var mailpoet_current_site_title = <%= json_encode(current_site_title) %>;
    <% endautoescape %>
    var mailpoet_beacon_articles = [
      '57f71d49c697911f2d323486',
      '57fb0e1d9033600277a681ca',
      '57f49a929033602e61d4b9f4',
      '57fb134cc697911f2d323e3b',
    ];
  </script>
<% endblock %>
<% block translations %>
  <% include 'settings_translations.html' %>
  <% include 'premium_key_validation_strings.html' %>
<% endblock %>

<% block after_javascript %>
<%= javascript('settings.js')%>
<% endblock %>
