{% set separatorType = content.divider.content %}
{% set hasContent = separatorType ? 'has-content' : '' %}
{% set contentPosition = design.content.position ? 'has-content-' ~ design.content.position : '' %}
{% set hasPattern = design.divider.style and design.divider.style not in ['dotted', 'dashed', 'solid', 'double'] ? 'has-pattern' : '' %}

{% set cssClasses = [
  'bde-fancy-divider__separator',
  hasContent,
  contentPosition,
  hasPattern
]|join(" ") %}

<div class="bde-fancy-divider__wrapper">
  <div class="{{ cssClasses }}">
  	{% if separatorType %}
    	{% if separatorType == 'image' %}
    		 <div class="bde-fancy-divider__content bde-fancy-divider__content--image">{{ macros.image(content.divider.image, content.content.size, alt, lazyLoad) }}</div>
    	{% endif %}
    	{% if separatorType == 'icon' %}
    		{% if content.divider.icon.svgCode %}
	    		<div class="bde-fancy-divider__content bde-fancy-divider__content--icon">{{ content.divider.icon.svgCode }}</div>
    	    {% else %}
              <div class="bde-fancy-divider__content bde-fancy-divider__content--icon">
                  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!-- Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"/></svg>
              </div>
            {% endif %}
        {% elseif separatorType == 'text' %}
    		<div class="bde-fancy-divider__content bde-fancy-divider__content--text">{{ content.divider.text ?? 'Divider Text' }}</div>
    	{% endif %}
    {% endif %}
  </div>
</div>
