import{template as t}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let ProductListItem=n=>{let{pageContext:o,children:a}=n,{productItemClass:r,gpProductClass:c}=e(n);return t`
      <gp-product
        gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape  }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,  "formId": "{{ product_form_id }}"}'
        gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(o)}}'
        class="${c}"

      >
        {%- form 'product', product, id: product_form_id, class: 'form contents ${r}',  data-type: 'add-to-cart-form', autocomplete: 'off' -%}
        <input type="hidden" name="id" value="{{ variant.id }}" />
        <input type="hidden" min="1" name="quantity"  value="{{ quantity }}" />
        <button type="submit" onclick="return false;" style="display:none;"></button>
          ${a}
        {%- endform -%}
      </gp-product>
  `};export{ProductListItem as default};
