{namespace neos=Neos\Neos\ViewHelpers}
<div class="o-container o-container--sm {marginTop}">
    <figure class="c-image{f:if(condition: imageClassName, then: ' {imageClassName}')}">
        <f:render partial="SimpleImage" arguments="{_all}" />
        <f:if condition="!{hideCaption}">
            <figcaption class="c-image__caption">
                {neos:contentElement.editable(property: 'caption', node: node)}
            </figcaption>
        </f:if>

        <f:if condition="{imageDecoration} && {hideCaption}"> 
            <f:if condition="{copyrightnotice}">
                <p class="c-image__copyrightnotice">&#169; {copyrightnotice}</p>
            </f:if>
            <f:if condition="{imageDecorationAlignment} == 'stretched'">
                <f:then>
                    <img class="c-image__decoration" src="{neos.media:uri.image(image: imageDecoration)}" style="width: 100%;"/>
                </f:then>
                <f:else>
                    <f:if condition="{imageDecorationAlignment} == 'pattern'">
                        <f:then>
                            <div class="c-image__decoration" style="background-image: url('{neos.media:uri.image(image: imageDecoration)}');">
                                <img src="{neos.media:uri.image(image: imageDecoration)}" style="visibility: hidden;"/>
                            </div>
                        </f:then>
                        <f:else>
                            <img src="{neos.media:uri.image(image: imageDecoration)}" class="c-image__decoration"/>
                        </f:else>
                    </f:if>
                </f:else>
            </f:if>
        </f:if>

    </figure>
</div>
