<% if params[:show_chat] %>
  <%= javascript_include_tag "//js.hs-scripts.com/7344617.js", defer: "defer", async: true, id: "hs-script-loader" %>
  <%= javascript_tag nonce: true do %>
    function onConversationsAPIReady() {
      window.HubSpotConversations.widget.load({ widgetOpen: true });
      window.HubSpotConversations.widget.open();
    }
    if (window.HubSpotConversations) {
      onConversationsAPIReady();
    } else {
      window.hsConversationsOnReady = [onConversationsAPIReady];
    }
  <% end %>
<% end %>
<p class="alert alert-success p-3 lead text-center"><%= t '.success_message' %></p>
<%= link_to fa_icon("arrow-left", text: "Back"), [@project, :task_requests], class: "btn btn-primary" %>
