// Qt
import QtQuick 2.12

//  Qml imports
import "qrc:/globals"
import "qrc:/components"
import "qrc:/compounds"
import "qrc:/pages/posttreatment"


PostTreatmentBase { id: _root
    title.text          : qsTr("Drain Consumable Options")
    title.anchors {
        top         : header.bottom
        topMargin   : Variables.defaultMargin * 2
    }

    title.font.pixelSize    : Fonts.fontPixelSection
    title.font.weight       : Font.Medium

    Text { id: _descriptionText
        anchors {
            top         : title.bottom
            topMargin   : Variables.defaultMargin
            horizontalCenter: parent.horizontalCenter
        }
        color           : Colors.textMain
        font.pixelSize  : Fonts.fontPixelTextRectExtra
        text            : qsTr("Disconnect your consumables per your clinic's instructions")
    }

    Item { id: _content
        anchors {
            top             : _descriptionText.bottom
            topMargin       : Variables.defaultMargin * 4
            bottom          : footer.top
            left            : parent.left
            right           : parent.right
        }

        ProcessStatusView { id: _drainDialyzer
            anchors.right   : _line.left
            width           : parent.width / 3
            height          : parent.height
            title           : qsTr("Draining Dialyzer")
            leftButtonText  : qsTr("Cancel Drain")
            progressText    : qsTr("Draining Dialyzer...")

            // TODO update with messaging
            minimum         : 0
            maximum         : 100
            value           : 50
        }

        Line { id: _line
            orientation :  Line.Orientation.Vertical
            color       : Colors.panelBorderColor
            length      : _content.height
            anchors.horizontalCenter: parent.horizontalCenter
        }

        ProcessStatusView { id: _drainBicarbCartridge
            anchors.left    : _line.right
            width           : parent.width / 3
            height          : parent.height
            title           : qsTr("Bicarb Cartridge Options")
            leftButtonText  : qsTr("Cancel Drain")
            rightButtonText : qsTr("Depressurize")
            progressText    : qsTr("Draining Bicart...")

            // TODO update with messaging
            minimum         : 0
            maximum         : 100
            value           : 25
        }
    }
}
