<p class="py-6">
  <p class='py-2'>Use this API key to authenticate your requests.</p>
  <code><%= current_user.api_key %></code>

  <p class='py-2'>
    Or you can scan it in your Dawarich iOS app:
    <%= api_key_qr_code(current_user) %>
  </p>

  <p class='py-2'>
    <p>Docs: <%= link_to "API documentation", '/api-docs', class: 'underline hover:no-underline' %></p>

    <h3 class='text-xl font-bold mt-4'>Usage examples</h3>

    <h3 class='text-lg font-bold mt-4'>Dawarich iOS app</h3>
    <p>Provide your instance URL:</p>
    <p class='mb-2'><code><%= root_url %></code></p>

    <p>And provide your API key:</p>
    <p><code><%= current_user.api_key %></code></p>
    <div class='divider'>OR</div>

    <h3 class='text-lg font-bold mt-4'>OwnTracks</h3>
    <p><code><%= api_v1_owntracks_points_url(api_key: current_user.api_key) %></code></p>

    <div class='divider'>OR</div>
    <h3 class='text-lg font-bold mt-4'>Overland</h3>
    <p><code><%= api_v1_overland_batches_url(api_key: current_user.api_key) %></code></p>
  </p>
  <p class='py-2'>
    <%= link_to "Generate new API key", generate_api_key_path, data: { turbo_confirm: "Are you sure? This will invalidate the current API key.", turbo_method: :post }, class: 'btn btn-primary' %>
  </p>
</p>
