{% if userCanEditGoals %}
    {% set addNewGoalIntro %}
        <p>{{ 'Goals_NewGoalIntro'|translate }}</p>
        <p>{{ 'Goals_LearnMoreAboutGoalTrackingDocumentation'|translate("<a target='_blank' rel='noreferrer noopener' href='https://matomo.org/docs/tracking-goals-web-analytics/'>","</a>")|raw }}</p>
    {% endset %}

    {% include "@Goals/_addEditGoal.twig" %}

    <br/><br/>

{% else %}
    <div piwik-content-block content-title="{{ 'Goals_AddNewGoal'|translate|e('html_attr') }}">
        <p>
            {{ 'Goals_NoGoalsNeedAccess2'|translate|raw }}
        </p>
        <p>
            {{ 'Goals_LearnMoreAboutGoalTrackingDocumentation'|translate("<a target='_blank' rel='noreferrer noopener' href='https://matomo.org/docs/tracking-goals-web-analytics/'>","</a>")|raw }}
        </p>
    </div>
    {{ postEvent("Template.afterGoalCannotAddNewGoal") }}

{% endif %}
