<core:FragmentDefinition
    xmlns="sap.m"
    xmlns:core="sap.ui.core"
    xmlns:grid="sap.ui.layout.cssgrid"
    core:require="{
    translate: 'sap/mcsuite/model/Translate', 
    utils: 'sap/mcsuite/model/Utils'
  }"
>
    <Dialog
        draggable="true"
        contentHeight="auto"
        contentWidth="auto"
        showHeader="false"
        class="mc-dialog"
        afterClose="utils.AlertDetail.onAlertDetailDialogClose"
    >
        <VBox
            class="mc-dialog-header"
            alignItems="Stretch"
            justifyContent="SpaceBetween"
        >
            <HBox
                alignItems="Center"
                justifyContent="Start"
            >
                <Title
                    text="{= ${type} === 'JOB' ? ${_job_id/name} : ${_roster_id/name} }"
                    level="H3"
                />
            </HBox>
        </VBox>
        <VBox
            class='mc-form'
            backgroundDesign='Solid'
            alignContent='SpaceAround'
        >
            <grid:CSSGrid
                class="sapUiSmallMargin"
                gridTemplateColumns="1fr 1fr"
            >
                <Label
                    text="{parts: [{value:'crm_alerts_dt'}, {value:'prio'}], formatter: 'translate.Field.get'}"
                />
                <StepInput
                    value="{prio}"
                    min="0"
                    max="9"
                    step="1"
                />
            </grid:CSSGrid>
            <grid:CSSGrid
                class="sapUiSmallMargin"
                gridTemplateColumns="1fr 1fr"
            >
                <Label
                    text="{parts: [{value:'crm_alerts_dt'}, {value:'status'}], formatter: 'translate.Field.get'}"
                />
                <Select
                    id="alert-detail-pos-select"
                    selectedKey="{status}"
                    forceSelection="true"
                >
                    <items>
                        <core:Item key="1" text="{parts: [{value:'LITERAL'}, {value:'ACTIVE'}, {value:'Aktiv'}], formatter: 'translate.Label.get'}" />
                        <core:Item key="2" text="{parts: [{value:'LITERAL'}, {value:'INACTIVE'}, {value:'Inaktiv'}], formatter: 'translate.Label.get'}" />
                    </items>
                    
                </Select>
            </grid:CSSGrid>
            <HBox
                class="sapUiSmallMargin"
                justifyContent="Center"
                alignContent="Center"
            >
                <Button
                    text="{parts: [{value:'BUTTON'}, {value:'SAVE'}, {value:'Save'}], formatter: 'translate.Label.get'}"
                    type="Emphasized"
                    press="utils.AlertDetail.onAlertDetailDialogSave"
                />
            </HBox>
        </VBox>
    </Dialog>
</core:FragmentDefinition>
