{# Grimm leasing currently replaced by albis, keep in case of reverting to old logic without albis plugin #}
{# trigger modal #}
{# {% if price > 12500 %}
{% set range = "fifthRange" %}
{% elseif price > 5000 %}
{% set range = "fourthRange" %}
{% elseif price > 2500 %}
{% set range = "thirdRange" %}
{% elseif price > 500 %}
{% set range = "secondRange" %}
{% else %}
{% set range = "firstRange" %}
{% endif %}
{% set snippetString = "detail.leasing.durationAmount.fifthDuration.rates." ~ range %}
{% set factor = snippetString|trans|sw_sanitize %} #}
{# cart #}
{# {% if activeRoute == "frontend.checkout.cart.page" %} #}
{# <div class="leasing-info leasing-info--cart">
<div>
{{ 'detail.priceDataInfoFrom'|trans|sw_sanitize|lower }}
<span class="leasing-info__price">{{ ((price * factor) / 100)|currency }}</span>
{{ "detail.leasing.titleCheckout"|trans|sw_sanitize }}
</div>
<button type="button" class="btn btn-secondary btn-block" data-toggle="modal" data-target="#leasingModal">
{{ "detail.leasing.title"|trans|sw_sanitize }}
</button>
</div> #}
{# detail page #}
{% if activeRoute == "frontend.detail.page" %}
<div class="leasing-info row justify-content-between align-content-center">
{# <button type="button" class="monthly-installment-btn grm-link" data-toggle="modal" data-target="#leasingModal">
{{ "detail.leasing.header"|trans|sw_sanitize }}
</button>
{{ 'detail.priceDataInfoFrom'|trans|sw_sanitize|lower }}
<span class="leasing-info__price">
{{ ((price * factor) / 100)|currency }}
</span> #}
{% if config('AlbisLease.config') %}
<a class="monthly-installment-btn d-inline-block ml-1 mb-4 col-12"
{# href="{{ path('frontend.albis.modal',{ productnumber: page.product.productNumber }) }}"
data-toggle="modal"
data-modal-class="quickview-modal"
data-url="{{ path('frontend.albis.modal',{ productnumber: page.product.productNumber }) }}" #}
>
{% sw_icon 'info' %} <span class="leasing-title">{{ "detail.leasing.header"|trans|sw_sanitize }}</span>
</a>
{% endif %}
<div class="col-7 align-self-center">
<p class="mb-0"> {{ "detail.leasing.description"|trans|sw_sanitize }}</p>
</div>
<div class="col-5 align-self-center">
<button class="leasing-btn"
href="{{ path('frontend.albis.modal',{ productnumber: page.product.productNumber }) }}"
data-toggle="modal"
data-modal-class="quickview-modal"
data-url="{{ path('frontend.albis.modal',{ productnumber: page.product.productNumber }) }}"
>
{{ "detail.leasing.goodsOnLease"|trans|sw_sanitize }}
</button>
</div>
</div>
{% endif %}
{# modal #}
{# <div class="modal leasing-modal" id="leasingModal" tabindex="-1" role="dialog" aria-labelledby="leasing-modal" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header product-detail-share-modal__header">
{{ "detail.leasing.header"|trans|sw_sanitize }}
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
{% sw_icon 'schliessen' style {'pack': 'grimmtheme', 'namespace': 'GrimmTheme', 'size': 'xs'} %}
</button>
</div>
<div class="modal-body cms-block">
<div class="cms-element-form">
{% sw_include '@Storefront/solution360/grimm/leasing/leasing-form.html.twig' with {
action: 'frontend.form.contact.send'
}
%}
<div class="confirm-alert"></div>
</div>
</div>
</div>
</div>
</div> #}