{% set brand = 'FranceConnect'|t %}
{% set url = 'https://franceconnect.gouv.fr/' %}

{% if variant and variant|lower != 'default' %}
  {% set attributes = attributes.addClass('fr-connect--' ~ variant|lower|replace({_: '-'})) %}
  {% set brand = 'FranceConnect'|t %}
  {% set url = 'https://franceconnect.gouv.fr/france-connect-plus' %}
{% endif %}

<div class="fr-connect-group">
  <button{{ attributes.addClass('fr-connect') }}>
    <span class="fr-connect__login">{{ 'Identify with'|t }}</span>
    <span class="fr-connect__brand">{{ brand }}</span>
  </button>
  <p>
    {{ pattern('link',
      {
        label: 'What is @title?'|t({'@title': brand}),
        url: url
      }
    ) }}
  </p>
</div>
