{% sw_extends '@Parent/storefront/component/product/card/action.html.twig' %}
{% block component_product_box_action_form %}
{% block component_product_box_action_buy_redirect_input %}
{{ parent() }}
{% endblock %}
{% block page_product_detail_buy_product_buy_info %}
{{ parent() }}
{% endblock %}
{% if config("WexoCustomQuantityField").config.quantityListingPage %}
{% block page_product_detail_custom_quantity_field %}
<div class=" custom-quantity-field-advanced d-flex flex-row" data-custom-quantity="true">
{% block page_product_detail_custom_quantity_field_select %}
<div class="custom-quantity-field-column d-flex flex-wrap pr-2">
<div class="custom-quantity-field-wrapper d-inline-flex justify-content-between"
id="quantityData"
data-maxPurchase="{{ product.calculatedMaxPurchase }}"
data-minPurchase="{{ product.minPurchase }}"
data-purchaseSteps="{{ product.purchaseSteps }}"
data-autoSubmit="0">
{% block page_product_detail_custom_quantity_field_select_button_minus %}
<button type="button"
class="btn-secondary custom-quantity-field-button is-minus flex-column
align-content-center"
aria-label="lineItemBtnMinus[{{ product.id }}]">
{% sw_icon 'minus' style { 'size': 'sm' } %}
</button>
{% endblock %}
{% block page_product_detail_custom_quantity_field_select_input_field %}
<label class="mb-0 pb-1 pt-1">
<input id="lineItems[{{ product.id }}][quantity]"
class="custom-quantity-field-input h-100"
name="lineItems[{{ product.id }}][quantity]" type="text"
value="{{ product.minPurchase }}">
</label>
{% endblock %}
{% block page_product_detail_custom_quantity_field_select_button_plus %}
<button type="button"
class="btn-secondary custom-quantity-field-button is-plus flex-column
align-content-center"
aria-label="lineItemBtnPlus[{{ product.id }}]">
{% sw_icon 'plus' style { 'size': 'sm' } %}</button>
{% endblock %}
</div>
</div>
{% endblock %}
{% block page_product_detail_custom_quantity_field_button %}
<div class="d-flex flex-wrap custom-quantity-field-btn">
<button class="btn btn-block btn-buy"
title="{{ "listing.boxAddProduct"|trans|striptags }}">
{% sw_icon 'cart' style {
'color': 'color-cart',
'size': 'lg'
} %}
</button>
</div>
{% endblock %}
</div>
{% endblock %}
{% else %}
<button class="btn btn-block btn-buy"
title="{{ "listing.boxAddProduct"|trans|striptags }}">
{{ "listing.boxAddProduct"|trans|sw_sanitize }}
</button>
{% endif %}
{% endblock %}