/*!
 *
 * 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    PostTreatmentBase.qml
 * \author  (last)      Behrouz NematiPour
 * \date    (last)      15-May-2021
 * \author  (original)  Behrouz NematiPour
 * \date    (original)  13-Apr-2021
 *
 */

// Qt
import QtQuick 2.12

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

/*!
 * \brief   the parent page of the post-treatment screens
 */
TreatmentFlowBase { id: _root
    objectName: "_PostTreatmentBase"
    header.visible : false

    onVisibleChanged: if (visible) { _root.updateModel() }

    function updateModel () {
        let  group = stepNames[stackStepIndex]
        if ( group === undefined ) group = ""
        let instructionsGroup    = vSettings.instructions[group]

        if ( instructionsGroup !== undefined ) {
            instructionTitle      = instructionsGroup.title
            instructionStepNames  = instructionsGroup.keys
            instructionStepImages = instructionsGroup.values
        }
    }
}
