@model IReadOnlyList<object>

<h1>OAuth Clients</h1>
<p><a href="/admin/oauth-clients/create">Create</a></p>
<table>
  <thead>
    <tr><th>Name</th><th>Client Id</th><th>Type</th><th></th></tr>
  </thead>
  <tbody>
  @foreach (var item in Model)
  {
    var name = (string)item.GetType().GetProperty("name")!.GetValue(item)!;
    var clientId = (string)item.GetType().GetProperty("client_id")!.GetValue(item)!;
    var clientType = (string)item.GetType().GetProperty("client_type")!.GetValue(item)!;
    var id = (string)item.GetType().GetProperty("id")!.GetValue(item)!;
    <tr>
      <td>@name</td>
      <td>@clientId</td>
      <td>@clientType</td>
      <td>
        <a href="/admin/oauth-clients/edit/@id">Edit</a>
        <form method="post" action="/admin/oauth-clients/delete/@id" style="display:inline">
          <button type="submit">Delete</button>
        </form>
      </td>
    </tr>
  }
  </tbody>
</table>
