{{ 'footer.aio.min.css' | asset_url | stylesheet_tag }}

{%- assign section_id = '#section-' | append: section.id -%}

<div class="section-footer" id="section-{{ section.id }}">
  <div class="{{ section.settings.section_layout }}">
    <div class="section-wrapper d-flex align-items-center">
      <div class="copyright" style="color: {{ section.settings.copyright_color }};">
        &copy; {{ 'now' | date: "%Y" }} <strong>{{ shop.name | link_to: routes.root_url }}</strong>. {{ 'sections.footer.all_rights_reserved' | t }}
      </div>
      {%- if section.settings.payment_enable -%}
        <div class="footer__payment">
          <ul class="list list-payment">
            {%- for type in shop.enabled_payment_types -%}
              <li class="list-payment__item">
                {{ type | payment_type_svg_tag: class: 'icon icon--full-color' }}
              </li>
            {%- endfor -%}
          </ul>
        </div>
      {%- endif -%}
    </div>
  </div>
</div>
{% comment %} compress {% endcomment %}

{%- style -%}
  {%- render 'snippet-theme', type: 'section-style', preClassID: section_id, config: section.settings -%}
{%- endstyle -%}

{% schema %}
{
  "name": "t:sections.footer.name",
  "tag": "section",
  "limit": 1,
  "enabled_on": {
    "groups": ["footer"]
  },
  "settings": [
    {
      "type": "select",
      "id": "section_layout",
      "label": "t:settings_schema.global.settings.layout_mode.label",
      "default": "container",
      "options": [
        {
          "value": "container",
          "label": "t:settings_schema.global.settings.layout_mode.options__1.label"
        },
        {
          "value": "container-fluid",
          "label": "t:settings_schema.global.settings.layout_mode.options__2.label"
        }
      ]
    },
    {
      "type": "text",
      "id": "margin",
      "label": "t:sections.common.section_margin",
      "info": "t:sections.common.order_info"
    },
    {
      "type": "text",
      "id": "padding",
      "label": "t:sections.common.section_padding",
      "info": "t:sections.common.order_info"
    }, 
    {
      "type": "color",
      "id": "bg_color",
      "label": "t:sections.common.background_color",
      "default": "#eaeaea"
    },
    {
      "type": "color",
      "id": "copyright_color",
      "label": "t:sections.common.text_color",
      "default": "#333e48"
    },
    {
      "type": "header",
      "content": "t:sections.footer.settings.header__1.content"
    },
    {
      "type": "checkbox",
      "id": "payment_enable",
      "default": true,
      "label": "t:sections.common.enable_widget"
    }
  ],
  "presets": [
    {
      "name": "t:sections.footer.name"
    }
  ]
}
{% endschema %}