{% from 'components/buttons.html' import button %}
{% from 'components/links.html' import kemono_link %}

{% macro tooltip() %}
  <div
    id="flying-tooltip"
    class="tooltip"
  >
    {{ button('Close', 'tooltip__close') }}
    {{ caller() }}
  </div>
{% endmacro %}

{% macro register_message(action_name) %}
  <p class="tooltip__message tooltip__message--register">
    <span class="tooltip__action">{{ action_name }}</span> is only available to registered users.
    <br>
    Visit the {{ kemono_link('/account/login?location=' + request.path, 'login page', is_noop=false) }} if you have an account.
    <br>
    Otherwise visit the {{ kemono_link('/account/register?location=' + request.path, 'registration page', is_noop=false) }} to create one.
  </p>
{% endmacro %}
