{namespace vh=Newland\NeosViewHelpers\ViewHelpers}

<f:comment>
    <!--
        This partial is responsible for rendering the descriptive
        content of an article.

        Due to the nature of the layout based on availability of imagery,
        this content may be inserted at various positions.

        The article description below sometimes contains its own <p> tag,
        so we can't wrap it with one.
    -->
</f:comment>

<f:if condition="{article.isCity}">
    <f:then>
        <f:if condition="{article.abstract}">
            <div class="mb-4 text-grey-darkest leading-normal text-base" itemprop="description">
                {article.abstract -> f:format.raw()}
            </div>
        </f:if>

        <vh:render partial="ExpandableText" arguments="{_all}" contentAs="content">
            <div class="mb-4 text-grey-darkest leading-normal text-base" itemprop="description">
                <f:if condition="{vh:collection.includesValue(collection: configuration.displayOptions.show.hide, value: 'spaTownDescription')} == false">
                    {article.flatAttributes.cureDescription -> f:format.raw()}
                </f:if>
            </div>
            <f:if condition="{article.description}">
                <div class="mb-8 text-grey-darkest leading-normal text-base" itemprop="description">
                    {article.description -> f:format.raw()}
                </div>
            </f:if>
        </vh:render>
    </f:then>
    <f:else>
        <f:if condition="{article.abstract} && !{article.isTour}">
            <div class="mb-4 text-grey-darkest leading-normal text-base" itemprop="description">
                {article.abstract -> f:format.raw()}
            </div>
        </f:if>
        <f:if condition="{article.description}">
            <div class="mb-8 text-grey-darkest leading-normal text-base" itemprop="description">
                {article.description -> f:format.raw()}
            </div>
        </f:if>
    </f:else>
</f:if>
