{{ 'section-breadcrumb-v2.css' | asset_url | stylesheet_tag }}

{%- unless template == 'index' or template == 'cart' or template == 'list-collections' or template == '404' -%}
  {%- assign t = template | split: '.' | first -%}
  {%- case t -%}
    {%- when 'page' -%}
      {%- assign page_title = page.title -%}
    {%- when 'blog' -%}
      {%- assign page_title = blog.title -%}
    {%- when 'article' -%}
      {%- assign page_title = article.title -%}
  {%- endcase -%}
  <section {% render 'section-attr', style: '--pt-mobile:50px; --pb-mobile:50px;' %}>
    {% render 'section-bg-image' %}
    <xo-container>
      <div class='breadcrumb-v2'>
        <xo-animate xo-cascade>
          <h2 class='breadcrumb-v2__title'>{{ page_title }}</h2>
        </xo-animate>
        <xo-animate xo-cascade>
          {% render 'breadcrumb' %}
        </xo-animate>
      </div>
    </xo-container>
  </section>
{%- endunless -%}

{% schema %}
{
  "name": "t:sections.breadcrumb_v2.name",
  "settings": [
    {
      "type": "header",
      "content": "t:sections.all.heading.content"
    },
    {
      "type": "color_scheme",
      "id": "color_scheme",
      "label": "t:sections.all.color_scheme.label"
    },
    {
      "type": "color",
      "id": "background_color",
      "label": "t:sections.all.bg_color.label"
    },
    {
      "type": "color_background",
      "id": "background_gradient",
      "label": "t:sections.all.bg_gradient.label"
    },
    {
      "type": "image_picker",
      "id": "background_image_desktop",
      "label": "t:sections.all.background_image_desktop.label"
    },
    {
      "type": "image_picker",
      "id": "background_image_mobile",
      "label": "t:sections.all.background_image_mobile.label"
    },
    {
      "type": "checkbox",
      "id": "use_parallax",
      "label": "t:sections.all.use_parallax.label",
      "default": true
    },
    {
      "type": "number",
      "id": "padding_top",
      "label": "t:sections.all.padding_top.label",
      "default": 50
    },
    {
      "type": "number",
      "id": "padding_bottom",
      "label": "t:sections.all.padding_bottom.label",
      "default": 50
    }
  ],
  "presets": [
    {
      "name": "t:sections.breadcrumb_v2.presets.name"
    }
  ]
}
{% endschema %}
