<%= render 'shared/turbo_modal', title: t('api_and_embedding'), close_after_submit: false do %>
<%= render 'shared/clipboard_copy', icon: 'copy', text: @template.id, class: 'base-button', icon_class: 'w-6 h-6 text-white', copy_title: t('copy'), copied_title: t('copied') %>
<%= render 'shared/clipboard_copy', icon: 'copy', text: start_form_url(slug: @template.slug), class: 'base-button', icon_class: 'w-6 h-6 text-white', copy_title: t('copy'), copied_title: t('copied') %>
<%= 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 %>