"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../../carousel-v3/components/item/CarouselItem.liquid.js"),r=require("../../../carousel-v3/components/root/Carousel.liquid.js"),i=require("./common/helpers.js"),o=require("./common/classes.js"),s=require("./common/styles.js"),d=require("../../../helpers.js"),u=require("./ProductListCarouselItem.liquid.js");exports.default=a=>{let{builderProps:l,advanced:c,productSrc:n,productListId:p}=a,{carouselConfigSetting:m,carouselConfigStyle:f}=i.getData(a),{carouselItemStyle:g}=s.getStyle(a),{carouselClass:v}=o.getClass(a);return e.template`
    ${r.default({advanced:c,builderProps:{...l},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${l?.uid}`,rootClass:v,setting:m,styles:f,isProductList:!0,children:`
        {%- assign count = 0 -%}
        {%- for product in products limit: limit -%}
        {%- if product.id != empty -%}
        {%- assign count = count | plus: 1 -%}
        {%- assign variant = product.selected_or_first_available_variant -%}
        {%- assign product_form_id = 'product-form-' | append: "${l?.uid}" | append: product.id -%}
        ${t.default({builderProps:{...l},style:g,parentId:`product-list-carousel-${l?.uid} gp-child-item-${l?.uid}`,parentStyle:f,parentSettings:m,background:m?.background,children:`
            ${u.default({...a})}
          `})}
        {%- endif -%}
        {% endfor %}
        {%- if count == 0 and ${p.length} == 0 -%}
          {% if '${n}' == 'RelatedProduct' -%}
              <div>${d.getStaticLocale("ProductList","no_related_products")}</div>
            {% else %}
              <div>${d.getStaticLocale("ProductList","no_products_found")}</div>
          {%- endif -%}
        {%- endif -%}
      `})}
  `};
