/*!
 *
 * 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    DiagnosticsDialog.qml
 * \author  (last)      Dara Navaei
 * \date    (last)      05-Mar-2024
 * \author  (original)  Behrouz NematiPour
 * \date    (original)  11-May-2021
 *
 */
// Qt
import QtQuick 2.12
import QtQuick.Controls 2.12 // swipeview

// Project
//  Qml imports
import "qrc:/globals"
import "qrc:/components"
/*!
 * \brief   the pre treatment prime stack screen
 */
Item { id: _root
    SwipeView { id: _view
        currentIndex: 0
        anchors.fill: parent

        DiagnosticsTD { id: _tdPage }
        DiagnosticsDD { id: _ddPage }
        DiagnosticsFP { id: _fpPage }

        onCurrentIndexChanged: _menu.index = currentIndex
    }

    MainMenu { id: _menu
        anchors {
            top             : parent.top
            left            : parent.left
            leftMargin      : Variables.defaultMargin * 4
            right           : parent.right
            rightMargin     : Variables.defaultMargin * 4
        }

        width               : _root.width
        index               : _view.currentIndex
        color               : Colors.transparent
        titlePixelSize      : 30
        model               : _model

        onItemPressed: function (vIndex) {
            _view.currentIndex = vIndex
        }

        ListModel { id: _model
            ListElement {   text: qsTr("TD & Blood Handling")   ; visible: true   }
            ListElement {   text: qsTr("DD")                    ; visible: true   }
            ListElement {   text: qsTr("FP")                    ; visible: true   }
        }

        Line {
            anchors {
                bottom  : parent.bottom
                right   : parent.right
                left    : parent.left
            }

            color   : Colors.panelBorderColor
        }
    }
}
