{% extends "admin/users/get/base.html" %}

{% block tab %}
<div class="mt-6">
  <ul>
    <li class="flex items-center justify-between py-3 border-b border-slate-200">
      <div class="text-sm whitespace-nowrap">Tenant</div>
      <div class="text-sm font-medium text-slate-800 ml-2 truncate">{{ user.tenant.name }}</div>
    </li>
    <li class="flex items-center justify-between py-3 border-b border-slate-200">
      <div class="text-sm whitespace-nowrap">ID</div>
      <div class="text-sm font-medium text-slate-800 ml-2 truncate">{{ user.id }}</div>
      {{ buttons.clipboard(user.id) }}
    </li>
    <li class="flex items-center justify-between py-3 border-b border-slate-200">
      <div class="text-sm whitespace-nowrap">Created at</div>
      <div class="text-sm font-medium text-slate-800 ml-2 truncate">{{ user.created_at.strftime('%x %X') }}</div>
    </li>
    <li class="flex items-center justify-between py-3 border-b border-slate-200">
      <div class="text-sm whitespace-nowrap">Updated at</div>
      <div class="text-sm font-medium text-slate-800 ml-2 truncate">{{ user.updated_at.strftime('%x %X') }}</div>
    </li>
  </ul>
</div>
<div class="mt-6 space-y-4">
  <a
    href="{{ url_for('dashboard.users:access_token', id=user.id) }}"
    class="btn w-full btn bg-yellow-500 hover:bg-yellow-600 text-white"
    hx-boost="true"
    hx-target="#modal"
    _="install OpenModal"
  >
    Create an access token
  </a>
  <a
    href="{{ url_for('dashboard.users:update', id=user.id) }}"
    class="btn w-full border-slate-200 hover:border-slate-300"
    hx-boost="true"
    hx-target="#modal"
    _="install OpenModal"
  >
    Edit User
  </a>
  <a
    href="{{ url_for('dashboard.users:delete', id=user.id) }}"
    class="btn w-full bg-red-500 hover:bg-red-600 text-white"
    hx-boost="true"
    hx-target="#modal"
    _="install OpenModal"
  >
    Delete User
  </a>
</div>
{% endblock %}
