<% if can?(:manage, EncryptedConfig) || (current_user != true_user && current_account.testing?) %>
  <%= form_for '', url: testing_account_path, method: current_account.testing? ? :delete : :post, html: { class: 'flex' } do |f| %>
    <label class="flex items-center justify-between" for="testing_toggle">
      <span class="mr-2 text-lg">
        <%= t('test_mode') %>
      </span>
      <submit-form data-on="change" class="flex">
        <%= f.check_box :testing_toggle, class: 'toggle', checked: current_account.testing? %>
      </submit-form>
    </label>
  <% end %>
<% end %>
