/*!
 *
 * Copyright (c) 2019-2020 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    PostTreatmentEndPause.qml
 * \author  (last)      Behrouz NematiPour
 * \date    (last)      10-Feb-2021
 * \author  (original)  Behrouz NematiPour
 * \date    (original)  10-Jan-2021
 *
 */

// Qt
import QtQuick 2.12

// Project
//  Qml imports
import "qrc:/globals"
import "qrc:/components"

/*!
 * \brief   the post treatment end pause screen
 */
ScreenItem { id: _root
    objectName: "_PostTreatmentEndPause"

    QtObject { id: _private
        property int sectionSpace : 30
        property int sectionWidth : _root.width  * 2/3 - sectionSpace * 1.5
        property int sectionHeight: _root.width  * 1/3 - sectionSpace * 1.5
    }
    Text { id: _title
        anchors {
            top: parent.top
            topMargin: 65
            horizontalCenter: parent.horizontalCenter
        }
        color: Colors.white
        text: qsTr("Treatment Complete Paused")
        font.pixelSize: Fonts.fontPixelTitle
    }

    TimeText { id: timeout
        visible         : false
        anchors {
            horizontalCenter: parent.horizontalCenter
            top             : _title.bottom
            topMargin       : 15
        }
        textPixelSize   : 30
        textWeight      : Font.Normal
        secondsVisible  : false
        // the TimeText component works with hour and minute mainly
        // so changing the seconds to minuts was easier than changing the component
        seconds         : 0 * 60
    }

    Rectangle {
        color   : Colors.backgroundDialog
        width   : _private.sectionWidth
        height  : _private.sectionHeight
        border.width: 2
        border.color: Colors.borderDisableButton
        radius: 10
        anchors.centerIn: parent
        Text { id: _visualAID
            anchors.centerIn: parent
            color: Colors.white
            text: qsTr("Visual AID\nplaceholder")
            font.pixelSize: Fonts.fontPixelButton
        }
    }

    onVisibleChanged: {
        if (visible) {
            _mainMenu     .hidden = true
            _treatmentMenu.hidden = true
        }
    }
}
