%= render 'shared/turbo_modal', title: t('api_and_embedding'), close_after_submit: false do %>
  
  
  <%= render 'templates/embedding', template: @template %>
  <% if can?(:manage, TemplateSharing.new(template: @template)) %>
    <%= form_for '', url: template_sharings_testing_index_path, method: :post, html: { class: 'mt-1' } do |f| %>
      <%= f.hidden_field :template_id, value: @template.id %>
      
        
          <%= t('share_template_with_test_environment') %>
        
        <%= f.check_box :value, class: 'toggle', checked: @template.template_sharings.exists?(account_id: current_account.testing_accounts), onchange: 'this.form.requestSubmit()' %>
      
    <% end %>
    
    
  <% end %>
  <%= render 'templates_code_modal/preferences' %>
  <%= render 'templates_code_modal/placeholder' %>
<% end %>