{% if (defaultLink ?? null) %}
<a
href="{{ defaultLink.link | trimUrl }}"
target="{{ defaultLink.target ?: '_self' }}"
class="{{ buttonClass ?? 'button' }}"
>
{{ (textPrefix ?? null)|raw }}{{ defaultLink.title }}{{ (textSuffix ?? null)|raw }}
</a>
{# If a product or productCategory is passed, show the open-form button instead of a customisable button. #}
{% elseif (product ?? null) or (productCategory ?? null) or (showRentalFormButton ?? null) or (not editmode and 'is-modal' in pimcore_link(fieldName ?? 'link').class) %}
{% if greenButton %}
{% set buttonSlot %}
<div class="relative">
<button
@click="props.toggleModal"
class="button {{ showRentalFormButtonColor === 'gray' ? 'button__primary' : 'button__green' }}"
data-track-button-id="conversion_requestquote"
>
{{ 'Offerte aanvragen'|trans }}
</button>
{% if showCustomButtonComment %}
<div class="flex items-start justify-center my-2 ml-2 text-xs md:ml-0 md:my-0 md:left-0 md:absolute text-blue whitespace-nowrap md:-bottom-8 mb-8">
<span class="hidden md:absolute md:block -top-10 -left-10">
<svg width="47" height="54" xmlns="http://www.w3.org/2000/svg"><defs><clipPath id="1234"><path d="M7.553.59c.269.47.067 1.076-.471 1.345a83.87 83.87 0 0 1-2.423 1.077c11.135.712 19.956 7.124 22.808 16.82 2.893 9.89-1.346 19.847-11.169 26.037a.765.765 0 0 1-.538.201c-.336 0-.672-.135-.874-.471-.27-.471-.135-1.077.336-1.413 9.015-5.72 12.985-14.802 10.361-23.75-2.605-8.895-10.792-14.79-21.16-15.417.914.72 1.813 1.58 2.457 2.77.27.47.135 1.076-.404 1.345-.135.268-.336.268-.471.268-.336 0-.673-.202-.875-.538-.74-1.278-1.75-2.085-2.892-2.893C1.565 5.433.892 4.962.287 4.29a.995.995 0 0 1-.27-.875c.068-.336.27-.606.539-.74 1.009-.471 1.95-.875 2.892-1.278C4.39.993 5.332.59 6.207.119c.47-.27 1.077-.068 1.346.47Z"/></clipPath><clipPath id="4567"><path d="M28.36 0v46.07H0V0h28.36Z"/></clipPath></defs><g clip-path="url(#1234)" transform="scale(-1 1) rotate(26 -13.163 -55.877)"><g clip-path="url(#4567)"><path fill="#0071BB" d="M0 0h28.36v46.07H0V0z"/></g></g></svg>
</span>
<span class="md:hidden">
<svg width="22" height="20" xmlns="http://www.w3.org/2000/svg"><defs><clipPath id="107118525210612011410197100"><path d="M12.01 0v18.086H0V0h12.01Z"/></clipPath><clipPath id="53121112112521191031055798"><path d="M11.341 0c.201.002.4.104.54.286a.664.664 0 0 1 .094.604c-.166.581-.432 1.06-.679 1.58-.449.82-.819 1.6-.889 2.583a.724.724 0 0 1-.285.53l-.082.05c-.081.039-.202.098-.362-.023a.633.633 0 0 1-.636-.69c.039-.902.327-1.682.664-2.38C3.883 5.828.71 11.463 1.425 17.332a.66.66 0 1 1-1.309.185c-.802-6.418 2.6-12.55 8.86-16.115-.57.028-1.148.053-1.768.063-.401-.004-.7-.308-.677-.67.004-.401.309-.7.67-.676.663.027 1.346-.007 2.03-.04a64.742 64.742 0 0 1 2.11-.08Z"/></clipPath><clipPath id="5353105120011210011111656"><path d="M12.01 0v18.086H0V0h12.01Z"/></clipPath></defs><g clip-path="url(#107118525210612011410197100)" transform="rotate(-57 9.275 5.036)"><g clip-path="url(#53121112112521191031055798)"><g clip-path="url(#5353105120011210011111656)"><path fill="#0071BA" d="M0 0h12.009v18.086H0V0z"/></g></g></g></svg>
</span>
<span class="py-2 md:py-0">{{ buttonComment }}</span>
</div>
{% endif %}
</div>
{% endset %}
<div class="inline">
{% include 'includes/partials/_rental-form.html.twig' with {
buttonText: pimcore_link(fieldName ?? "link").text,
buttonSlot: buttonSlot,
requestUrl: data.request.url ?? null
} %}
</div>
{% else %}
<div class="inline">
{% include 'includes/partials/_rental-form.html.twig' with {
buttonText: pimcore_link(fieldName ?? "link").text,
requestUrl: data.request.url ?? null
} %}
</div>
{% endif %}
{% else %}
{{ pimcore_link(fieldName ?? 'link', {
class: buttonClass ?? 'button',
textPrefix: textPrefix ?? null,
textSuffix: textSuffix ?? null,
}) }}
{% endif %}