/*!
 *
 * Copyright (c) 2023-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    SettingsInformation.qml
 * \author  (last)      Behrouz NematiPour
 * \date    (last)      11-Sep-2023
 * \author  (original)  Behrouz NematiPour
 * \date    (original)  18-Jul-2023
 *
 */

// Qt
import QtQuick 2.12

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

/*!
 * \brief   SettingsInformation is the screen
 *          which queries the system for the versions and serial numbers and service records
 *          and display them
 */
SettingsBase    { id: _root
    itemIndex                       : SettingsStack.Information
    confirmVisible                  : false

    contentItem:  Row {
        anchors.fill: parent
        spacing     : Variables.defaultMargin * 2

        ReviewContainer { id: _versions
            title           : qsTr("Versions")
            width           : parent.width / 2 - Variables.defaultMargin
            cellHeight      : 65
            valuePixelSize  : Fonts.fontPixelDefaultButton

            label   : [ qsTr("OS Version"           ),
                        qsTr("UI Version"           ),
                        qsTr("TD Version"           ),
                        qsTr("TD FPGA Version"      ),
                        qsTr("TD Serial Number"     ),
                        qsTr("DD Version"           ),
                        qsTr("DD FPGA Version"      ),
                        qsTr("DD Serial Number"     ),
                        qsTr("FP Version"           ),
                        qsTr("FP FPGA Version"      )]

            initial : [ vDevice                 .osVersion          ,
                        Qt                      .application.version,
                        vAdjustmentVersions     .tdVerDevice        ,
                        vAdjustmentVersions     .tdVerFPGA          ,
                        vAdjustmentVersions     .tdSerial           ,
                        vAdjustmentVersions     .ddVerDevice        ,
                        vAdjustmentVersions     .ddVerFPGA          ,
                        vAdjustmentVersions     .ddSerial           ,
                        vAdjustmentVersions     .fpVerDevice        ,
                        vAdjustmentVersions     .fpVerFPGA          ]

            actual  : ["","","","","","","","","",""]
            units   : ["","","","","","","","","",""]
        }

        Column {
            width       : parent.width / 2 - Variables.defaultMargin
            spacing     : Variables.defaultMargin * 2

            ReviewContainer { id: _service
                title           : qsTr("Service")
                width           : parent.width
                cellHeight      : 65
                valuePixelSize  : Fonts.fontPixelDefaultButton

                label   : [ qsTr("TD Last Service Date" ),
                            qsTr("TD Next Service Date" ),
                            qsTr("DD Last Service Date" ),
                            qsTr("DD Next Service Date" )]

                initial : [ vAdjustmentServiceDates .hdLastServiceDate ,
                            vAdjustmentServiceDates .hdNextServiceDate ,
                            vAdjustmentServiceDates .dgLastServiceDate ,
                            vAdjustmentServiceDates .dgNextServiceDate ]

                actual  : ["","","",""]
                units   : ["","","",""]
            }

            ReviewContainer { id: _waterConfiguration
                title           : qsTr("Water Configuration")
                width           : parent.width
                cellHeight      : 65
                valuePixelSize  : Fonts.fontPixelDefaultButton

                label   : [ qsTr("Water Input" )]

                initial : [ qsTr("RO Water %1" ).arg(vSettings.roWaterMode ? qsTr("Featured") : qsTr("Defeatured")) ]

                actual  : [""]
                units   : [""]
            }
        }
    }
}
