

{% render 'product-media-gallery-content',
  media_presentation: 'carousel',
  block_settings: block.settings,
  block_id: block.id,
  block_shopify_attributes: block.shopify_attributes,
  block: block,
  section: section
%}

{% schema %}
{
  "name": "t:names.product_media",
  "tag": null,
  "settings": [
    {
      "type": "select",
      "id": "aspect_ratio",
      "label": "t:settings.aspect_ratio",
      "options": [
        {
          "value": "adapt",
          "label": "t:options.auto"
        },
        {
          "value": "1/1.25",
          "label": "t:options.portrait"
        },
        {
          "value": "1",
          "label": "t:options.square"
        },
        {
          "value": "2/1",
          "label": "t:options.landscape"
        }
      ],
      "default": "adapt"
    },
    {
      "type": "checkbox",
      "id": "constrain_to_viewport",
      "label": "t:settings.limit_media_to_screen_height",
      "default": false
    },
    {
      "type": "select",
      "id": "media_fit",
      "label": "t:settings.media_fit",
      "options": [
        {
          "value": "cover",
          "label": "t:options.cover"
        },
        {
          "value": "contain",
          "label": "t:options.contain"
        }
      ],
      "default": "cover",
      "visible_if": "{{ block.settings.aspect_ratio == 'adapt' and block.settings.constrain_to_viewport == true }}"
    },
    {
      "type": "range",
      "id": "media_radius",
      "label": "t:settings.border_radius",
      "min": 0,
      "max": 32,
      "step": 1,
      "unit": "px",
      "default": 4
    },
    {
      "type": "checkbox",
      "id": "extend_media",
      "label": "t:settings.extend_media_to_screen_edge",
      "default": true,
      "visible_if": "{{ section.settings.content_width == 'content-center-aligned' }}"
    },
    {
      "type": "checkbox",
      "id": "zoom",
      "label": "t:settings.enable_zoom",
      "default": true
    },
    {
      "type": "checkbox",
      "id": "video_loop",
      "label": "t:settings.enable_video_looping",
      "default": false
    },
    {
      "type": "checkbox",
      "id": "hide_variants",
      "default": false,
      "label": "t:settings.hide_unselected_variant_media"
    },
    {
      "type": "header",
      "content": "t:content.carousel"
    },
    {
      "type": "select",
      "id": "icons_style",
      "label": "t:settings.icons",
      "options": [
        {
          "value": "arrow",
          "label": "t:options.arrows"
        },
        {
          "value": "chevron",
          "label": "t:options.chevrons"
        },
        {
          "value": "arrows_large",
          "label": "t:options.large_arrows"
        },
        {
          "value": "chevron_large",
          "label": "t:options.large_chevrons"
        }
      ],
      "default": "arrow"
    },
    {
      "type": "select",
      "id": "slideshow_controls_style",
      "label": "t:settings.pagination",
      "options": [
        {
          "value": "dots",
          "label": "t:options.dots"
        },
        {
          "value": "counter",
          "label": "t:options.counter"
        },
        {
          "value": "thumbnails",
          "label": "t:options.thumbnails"
        }
      ]
    },
    {
      "type": "select",
      "id": "slideshow_mobile_controls_style",
      "label": "t:settings.mobile_pagination",
      "options": [
        {
          "value": "dots",
          "label": "t:options.dots"
        },
        {
          "value": "counter",
          "label": "t:options.counter"
        },
        {
          "value": "hint",
          "label": "t:options.hint"
        },
        {
          "value": "thumbnails",
          "label": "t:options.thumbnails"
        }
      ]
    },
    {
      "type": "header",
      "content": "t:content.thumbnails",
      "visible_if": "{{ block.settings.slideshow_controls_style == 'thumbnails' or block.settings.slideshow_mobile_controls_style == 'thumbnails' }}"
    },
    {
      "type": "select",
      "id": "thumbnail_position",
      "label": "t:settings.desktop_position",
      "options": [
        {
          "value": "left",
          "label": "t:options.left"
        },
        {
          "value": "bottom",
          "label": "t:options.bottom"
        },
        {
          "value": "right",
          "label": "t:options.right"
        }
      ],
      "default": "bottom",
      "visible_if": "{{ block.settings.slideshow_controls_style == 'thumbnails' }}"
    },
    {
      "type": "range",
      "id": "thumbnail_width",
      "label": "t:settings.width_desktop",
      "min": 44,
      "max": 72,
      "step": 1,
      "unit": "px",
      "default": 64,
      "visible_if": "{{ block.settings.slideshow_controls_style == 'thumbnails' }}"
    },
    {
      "type": "range",
      "id": "thumbnail_radius",
      "label": "t:settings.corner_radius",
      "min": 0,
      "max": 50,
      "step": 1,
      "unit": "px",
      "default": 0,
      "visible_if": "{{ block.settings.slideshow_controls_style == 'thumbnails' or block.settings.slideshow_mobile_controls_style == 'thumbnails' }}"
    },
    {
      "type": "header",
      "content": "t:content.padding"
    },
    {
      "type": "range",
      "id": "padding-block-start",
      "label": "t:settings.top",
      "min": 0,
      "max": 100,
      "step": 1,
      "unit": "px",
      "default": 0
    },
    {
      "type": "range",
      "id": "padding-block-end",
      "label": "t:settings.bottom",
      "min": 0,
      "max": 100,
      "step": 1,
      "unit": "px",
      "default": 0
    },
    {
      "type": "range",
      "id": "padding-inline-start",
      "label": "t:settings.left",
      "min": 0,
      "max": 100,
      "step": 1,
      "unit": "px",
      "default": 0
    },
    {
      "type": "range",
      "id": "padding-inline-end",
      "label": "t:settings.right",
      "min": 0,
      "max": 100,
      "step": 1,
      "unit": "px",
      "default": 0
    }
  ],
  "presets": [
    {
      "name": "t:names.product_media"
    }
  ]
}
{% endschema %}
