{# @copyright   Copyright (C) 2010-2026 Combodo SARL #}
{# @license     http://opensource.org/licenses/AGPL-3.0 #}

{% if bDeletionNeeded %}
    {% UIFieldSet Standard {sLegend:'DataFeatureRemoval:DeletionPlan:Title'|dict_s} %}
        {% UIDataTable ForForm { sRef:'aDeletionPlanSummary', aColumns:aDeletionPlanSummary.Columns, aData:aDeletionPlanSummary.Data} %}{% EndUIDataTable %}
    {% EndUIFieldSet %}
    {% if bDeletionPossible %}
        {% UIForm Standard {} %}
            {% UIInput ForHidden { sName:'transaction_id', sValue:sTransactionId} %}
            {% UIInput ForHidden { sName:'operation', sValue:'DoDeletion'} %}
            {% UIToolbar ForButton {} %}
                {% UIButton ForPrimaryAction {sLabel:'UI:Button:DoDeletion'|dict_s, sName:'btn_deletion', sId:'btn_deletion', bIsSubmit:true} %}
            {% EndUIToolbar %}
        {% EndUIForm %}
    {% else %}
        {% UIAlert ForFailure { sTitle: '', sContent: 'DataFeatureRemoval:DeletionPlan:Error:Issues'|dict_s } %}{% EndUIAlert %}
    {% endif %}
{% else %}
    {% UIAlert ForSuccess { sTitle:'DataFeatureRemoval:CleanupComplete:Title'|dict_s, sContent:'DataFeatureRemoval:CompilComplete'|dict_s } %}{% EndUIAlert %}

    {% UIForm Standard {sId:'launch-setup-form', Action:sLaunchSetupUrl, EncType: 'application/x-www-form-urlencoded'} %}
        {% for sKey, sValue in aSetupParams %}
            {% UIInput ForHidden { sName:sKey, sValue:sValue } %}
        {% endfor %}
        {% UIButton ForPrimaryAction {sLabel:'UI:Button:Setup'|dict_s, sName:'btn_setup', sId:'btn_setup', bIsSubmit:true} %}
    {% EndUIForm %}
{% endif %}

{% if bHasDeletionExecution %}
    {% UIFieldSet Standard {sLegend:'DataFeatureRemoval:Execution:Title'|dict_s} %}
    {% UIDataTable ForForm { sRef:'aDeletionExecutionSummary', aColumns:aDeletionExecutionSummary.Columns, aData:aDeletionExecutionSummary.Data} %}{% EndUIDataTable %}
    {% EndUIFieldSet %}
{% endif %}
