/*!
 *
 * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved.
 * \copyright
 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN
 * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER.
 *
 * \file    EndTreatmentAdditional.qml
 * \author  (last)      Behrouz NematiPour
 * \date    (last)      13-Sep-2023
 * \author  (original)  Behrouz NematiPour
 * \date    (original)  11-Apr-2021
 *
 */

// Qt
import QtQuick 2.12

// Project
//  Qml imports
import "qrc:/globals"
import "qrc:/components"
import "qrc:/pages/endtreatment"
import "qrc:/pages/treatment/sections"

/*!
 * \brief   the end treatment additional rinseback screen
 */
EndTreatmentBase { id: _root
    objectName: "_EndTreatmentAdditional"

    title.text: qsTr("Saline Bolus")

    // DEN-10163
    // hasTimeout  : vTreatmentRinseback.timeoutTotal
    // timeoutValue: vTreatmentRinseback.timeoutCountDown * 60

    ProgressCircle { id: _circle
        diameter: 335
        anchors.centerIn: parent

        minimum : 0
        maximum : vTreatmentRinseback.target
        value   : vTreatmentRinseback.current

        Text { id: _textVolume
            anchors.centerIn: parent
            color: Colors.textMain
            text: vTreatmentRinseback.current.toFixed(0) + " " + qsTr(Variables.unitTextFluid)
            font.pixelSize: 76
            font.weight: Font.ExtraLight

        }

        Text { id: _labelRate
            anchors {
                top: parent.bottom
                topMargin: 20
                horizontalCenter: parent.horizontalCenter
            }
            color: Colors.textMain
            text: vTreatmentRinseback.rate.toFixed(0) + " " + qsTr(Variables.unitTextFlowRate)
            font.pixelSize: 23
        }
    }

    TreatmentPressures          { id: _pressuresTouchArea
        // maybe now it makes sense for the ranges to be displayed
        // arterialLowerBound  : 0 // requested to hide the bounds
        // arterialUpperBound  : 0 // requested to hide the bounds
        // venousLowerBound    : 0 // requested to hide the bounds
        // venousUpperBound    : 0 // requested to hide the bounds

        isTouchable         : false
        x       : Variables.screenGridLeftColumnX
        y       : Variables.screenGridRow1Y
        width   : Variables.screenGridAreaWidth
        height  : Variables.screenGridAreaHeightRow1
    }
    Line { x: 0; y: Variables.screenGridRow1LineY; length: Variables.screenGridLineLength }

}
