{#
  Sub template for UnLondon block - CTA.

  A CTA button with a link

  text: the CTA text, plain text.
  cta_icon: classes for a desired icon in the CTA, string.
  url: the URL to link to, string.
  button_style: the button style, string.
#}

{% set button_style = button_style|default('default') %}

{% if cta_icon %}
  {% include '@atoms/tm-links/icon-bookended/icon-bookended.twig' with {
    "text": cta_text,
    "url": url,
    "icon_left": cta_icon,
    "class": 'btn btn-' ~ button_style,
    'display': 'inline',
  } only %}
{% else %}
  <a href="{{ url }}" class="btn btn-{{ button_style }}">{{ cta_text }}</a>
{% endif %}
