{#
/**
 * @file
 * Default theme implementation to display a linkicon item.
 *
 * Available variables:
 * - title: The link text or title, already sanitized at viewElements.
 * - title_only: The link text or title only without spans. 
 * - position: The icon placement relative to link text.
 * - icon_bundle: The icon bundle, integration with icon.module.
 * - icon_name: The icon name, e.g.: twitter, facebook, etc.
 * - attributes: An associative array of attributes to be placed in the span
 *   tag.
 *
 * @see template_preprocess_linkicon_item()
 *
 * @ingroup themeable
 */
#}
{%
  set title_classes = [
    icon ? 'linkicon__text' : 'linkicon__noicon',
  ]
%}
{% if title_only %}
  {{ title }}
{% else %}
  {% if position in ['bottom', 'right'] %}
    <span{{ title_attributes.addClass(title_classes) }}>{{ title }}</span>
    {{ icon }}
  {% else %}
    {{ icon }}
    <span{{ title_attributes.addClass(title_classes) }}>{{ title }}</span>
  {% endif %}
{% endif %}
