import QtQuick 2.12
import "qrc:/globals"
import "qrc:/components"

ConfirmDialog { id: _root
    messageText     : qsTr("Dialysis Treatment Complete!")
    confirmText     : qsTr("End Treatment")
    cancelText      : qsTr("Stay On Treatment")

    width           : 600
    height          : 600
    backgroundColor : Colors.darkDialogColor
    messageTextVerticalOffset   : Variables.defaultMargin * -1
    footerBottomMargin          : Variables.defaultMargin * 3

    Image { id  : _iconImage
        objectName:    "iconImage"

        anchors {
            top             : parent.top
            topMargin       : Variables.defaultMargin * 3
            horizontalCenter: parent.horizontalCenter
        }

        fillMode: Image.PreserveAspectFit
        source  : "qrc:/images/iCompleteCheck"
    }

    Connections            { target : vTreatmentAdjustmentEnd
        function onAdjustmentTriggered          ( vValue ) {
            if ( ! vTreatmentAdjustmentEnd.adjustment_Accepted ) {
                // TODO Update to show rejection message here vTreatmentAdjustmentEnd.text()
            }
        }
    }
}
