{% set updateCheck %}
    <span class="icon icon-fixed icon-reload"></span>
    <span id="updateCheckLinkContainer">
        {{ (lastUpdateCheckFailed|default(false) ? 'General_ErrorTryAgain' : 'CoreHome_CheckForUpdates')|translate }}
    </span>
{% endset %}

{% if
    isAutoUpdateEnabled and (
        (latest_version_available and hasSomeViewAccess and not isUserIsAnonymous and showUpdateNotificationToUser)
        or (
            isSuperUser
            and (
                (isManualUpdateCheck is defined and isManualUpdateCheck and lastUpdateCheckFailed is defined and lastUpdateCheckFailed)
                or (isAdminArea is defined and isAdminArea)
            )
        )
    ) %}
<div
    vue-entry="CoreHome.VersionInfoHeaderMessage"
    last-update-check-failed="{{ lastUpdateCheckFailed|default(false)|json_encode }}"
    latest-version-available="{{ latest_version_available|default(null)|json_encode }}"
    is-multi-server-environment="{{ isMultiServerEnvironment|default(false)|json_encode }}"
    is-super-user="{{ isSuperUser|default(false)|json_encode }}"
    is-admin-area="{{ isAdminArea|default(false)|json_encode }}"
    is-internet-enabled="{{ isInternetEnabled|default(false)|json_encode }}"
    update-check="{{ updateCheck|default|json_encode }}"
    has-some-view-access="{{ hasSomeViewAccess|default(false)|json_encode }}"
    is-anonymous="{{ isUserIsAnonymous|default(false)|json_encode }}"
    contact-email="{{ contactEmail|json_encode }}"
    piwik-version="{{ piwik_version|default(null)|json_encode }}"
    class="borderedControl piwikTopControl"
></div>

<span class="icon icon-arrowup zenModeToggle"></span>
{% else %}
<span class="icon icon-arrowup zenModeToggle"></span>
{% endif %}
