<core:FragmentDefinition
    xmlns="sap.m"
    xmlns:core="sap.ui.core"
    xmlns:dnd="sap.ui.core.dnd"
    xmlns:grid="sap.ui.layout.cssgrid"
    xmlns:l="sap.ui.layout"
    xmlns:layout="sap.ui.layout"
    xmlns:f="sap.ui.layout.form"
    core:require="{
    format: 'sap/mcsuite/model/Format', 
    translate: 'sap/mcsuite/model/Translate', 
    utils: 'sap/mcsuite/model/Utils'
  }"  
>
    <Dialog
        id="deleteEntityConfirmationDialog"
        draggable="true"
        contentHeight="auto"
        contentWidth="auto"
        showHeader="false"
        class="mc-dialog"
    >
        <VBox class="mc-dialog-header" alignItems="Stretch" justifyContent="SpaceBetween">
            <grid:CSSGrid gridTemplateColumns="2fr 5fr">
                <HBox alignItems="Start" justifyContent="Center">
                    <Avatar 
                        src="sap-icon://fa-light/trash"
                        displaySize="S"
                        class="sapUiTinyMarginEnd"
                    ></Avatar>
                </HBox>
                <VBox alignItems="Start" justifyContent="Center">
                    <HBox alignItems="Center" justifyContent="Start" height="1rem">
                        <Title 
                            text="{parts: [{value: 'LABEL'}, {value: 'CONFIRM_DELETE'}, {value: 'Bestätigung'}], formatter: 'translate.Label.get'}" level="H3"
                        ></Title>
                        
                    </HBox>
                </VBox>
            </grid:CSSGrid>
            
            <VBox class='mc-dialog-content' >
                <Text text="{parts: [{value: 'TEXT'}, {value: 'CONFIRM_DELETE_ENTITY'}, {value: 'Möchten Sie diesen Eintrag wirklich löschen?'}], formatter: 'translate.Label.get'}" class='sapUiSmallMarginBottom'/>
            </VBox>
        </VBox>
        <VBox alignItems="End" class="sapUiTinyMarginTop">
            <Button
                text="{parts: [{value: 'LITERAL'}, {value: 'DELETE'}, {value: 'Löschen'}], formatter: 'translate.Label.get'}"
                type="Reject"
                icon="sap-icon://delete"
                press="utils.Items.onConfirmDeleteItem"
            >
                <customData>
                    <core:CustomData key="from" value="{dialogModel>/from}"/>
                    <core:CustomData key="id" value="{dialogModel>/id}"/>
                    <core:CustomData key="subtask" value="{dialogModel>/subtask}"/>
                    <core:CustomData key="module" value="{dialogModel>/module}"/>
                    <core:CustomData key="type" value="{dialogModel>/type}"/>
                    <core:CustomData key="field" value="{dialogModel>/field}"/>
                    <core:CustomData key="value" value="{dialogModel>/value}"/>
                </customData>
            </Button>
        </VBox>
    </Dialog>
</core:FragmentDefinition>
