{% if editmode %}
<div class="settings">
<div class="position-relative settings-button-border">
<strong class="settings-header">Settings</strong><button class="toggle-settings"><i class="fa fa-plus"></i></button>
<div class="settings_container">
<div class="row middle-lg middle-md middle-sm middle-xs">
<div>Max Width on Content</div>
<div>{{ pimcore_numeric("maxWidth") }}</div>
</div>
<div class="row middle-lg middle-md middle-sm middle-xs">
<div>Horizontal Alignment</div>
<div>
{{ pimcore_select("horizontalAlignment", {
store: [
["left", "Left"],
["center", "Center"],
["right", "Right"]
]
}) }}
</div>
</div>
</div>
<div style="position: absolute; top: 10px; right: 0; font-weight: bold; text-transform: uppercase;">
Wysiwyg
</div>
</div>
</div>
{% endif %}
{% set maxWidthHorizontalAlignment = pimcore_select("horizontalAlignment").getData() == 'center' and pimcore_numeric("maxWidth").getData() ? ' style=max-width:' ~ pimcore_numeric("maxWidth").getData()|raw ~ 'px;margin-right:auto;margin-left:auto;' : pimcore_select("horizontalAlignment").getData() == 'right' and pimcore_numeric("maxWidth").getData() ? ' style=max-width:' ~ pimcore_numeric("maxWidth").getData()|raw ~ 'px;margin-left:auto;' : '' %}
{% set maxWidth = pimcore_numeric("maxWidth").getData() ? ' style=max-width:' ~ pimcore_numeric("maxWidth").getData() ~ 'px;' : '' %}
{% set cardLink = pimcore_link("cardLink").getHref() %}
<div class="{% if cardLink %}no-padding{% endif %}"{{ maxWidthHorizontalAlignment }}{{ maxWidth }}>
{% if not editmode and cardLink %}
<a class="card-content-link" href="{{cardLink}}">
<div class="absolute-top-right">
{{ source("@torq_static/img/icons/arrow-right.svg") }}
</div>
{% endif %}
{{
pimcore_wysiwyg("wysiwyg", {
height: 200,
class: "wysiwyg-editmode"
})
}}
{% if not editmode and cardLink %}
</a>
{% endif %}
</div>