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

// Qt
import QtQuick                  2.12

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

/*!
 * \brief   SettingsDecommission is the screen
 *          which asks for confirmation of performing a factory reset and doing it if confirmed
 */
UserConfirmation{ id: _root
    message             : vDevice.decommissionEnabled ? qsTr("Do you want to perform the %1?").arg(title.toLowerCase())
                                                      : qsTr("Please wait ...")
    itemIndex           : SettingsStack.Decommission
    notificationText    : vDevice.status

    confirmVisible      : true
    confirmEnabled      : vDevice.decommissionEnabled
    onConfirmClicked    : vDevice.decommission = "" // Need to set to something (ie: emtpy string) to trigger CPP code

    backVisible         : true
    backEnabled         : vDevice.decommissionEnabled
}
