{% import "macros/buttons.html" as buttons %}
{% import "macros/icons.html" as icons %}
{% import "macros/datatable.html" as datatable %}

{% macro provider_column(oauth_provider) %}
<a
  class="font-medium text-slate-800 hover:text-slate-900"
  href="{{ url_for('dashboard.oauth_providers:get', id=oauth_provider.id) }}"
  hx-boost="true"
  hx-target="#aside"
  _="install OpenAside"
>
  {{ oauth_provider.get_provider_display_name() }}
</a>
{% endmacro %}

{% macro name_column(oauth_provider) %}
{{ oauth_provider.name }}
{% endmacro %}

{{
  datatable.datatable(
    oauth_providers,
    count,
    datatable_query_parameters,
    "OAuth Providers",
    columns | map("get_column_macro") | list,
  )
}}
