{{ 'section-banner-v7.css' | asset_url | stylesheet_tag }}

{% comment %} Assign align. Align will get 3 values : start , center or end {% endcomment %}
{%- assign align = section.settings.align | default: 'start' -%}

<div class='banner-v265'>
  <div
    {% render 'section-attr' %}
  >
    {% render 'section-bg-image' %}

    <xo-animate xo-cascade>
      <div class='banner-v265__video'>
        <div class='banner-v265__video-style'>
          <xo-modal-trigger xo-name='banner-v265-video' class='banner-v265__trigger'>
            <button class='banner-v265__btn-2'>
              <div class='banner-v265__icon'>
                <div class='banner-v265__icon-circle'></div>
                <div class='banner-v265__icon-triangle'></div>
              </div>
            </button>
          </xo-modal-trigger>
          <h3 class='banner-v265__title'>{{ section.settings.title }}</h3>
        </div>
      </div>
    </xo-animate>
  </div>
</div>
<xo-modal xo-name='banner-v265-video' xo-animate='zoom' class='banner-v265__modal'>
  <xo-modal-trigger class='banner-v265__modal-close'>
    {% render 'icon', name: 'close-small', icon_size: '25' %}
  </xo-modal-trigger>
  {%- if section.settings.show_video_url -%}
    {% render 'video', video_url: section.settings.video_url, autoplay: false %}
  {%- else -%}
    {% render 'video', video: section.settings.video, autoplay: false %}
  {%- endif -%}
</xo-modal>

{% schema %}
{
  "name": "t:sections.banner_v7.name",
  "settings": [
    {
      "type": "header",
      "content": "t:sections.banner_v7.settings.header.content-1"
    },
    {
      "type": "text",
      "id": "title",
      "label": "t:sections.banner_v7.settings.title",
      "default": "Title"
    },
    {
      "type": "video",
      "id": "video",
      "label": "t:sections.banner_v7.settings.video.import"
    },
    {
      "type": "video_url",
      "id": "video_url",
      "label": "t:sections.banner_v7.settings.video.url",
      "accept": [
        "youtube",
        "vimeo"
      ]
    },
    {
      "type": "checkbox",
      "id": "show_video_url",
      "label": "t:sections.banner_v7.settings.show_video_url.label",
      "default": true
    },
    {
      "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.banner_v7.presets.name"
    }
  ]
}
{% endschema %}
