<!DOCTYPE html>
<html lang="<%= I18n.locale %>">
  <head>
    <title>BiGMedia.ai App</title>
    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <%= yield :meta %>

    <%= favicon_link_tag %>
    <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
    <%= javascript_pack_tag 'application' %>
    <%= javascript_include_analytics_js %>
  </head>

  <body>
    <%= content_for?(:header) ? yield(:header) : render("header") %>
    <%= render "masquerade" if masquerading? %>
    <main class="container-fluid py-3">
      <div class="flash-message"></div>
        <%= render "flash" %>
      </div>
      <%= content_for?(:content) ? yield(:content) : yield %>
    </main>
  </body>

  <%= identify_user_for_analytics Current.user %>
  <%= javascript_tag nonce: true do %>
    if (!navigator.cookieEnabled && window.location.pathname !== "<%= cookies_disabled_path %>") {
      window.location = "<%= cookies_disabled_path %>";
    }
  <% end %>
</html>
