/*!
 *
 * Copyright (c) 2020-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    AutoHideInfo.qml
 * \author  (last)      Behrouz NematiPour
 * \date    (last)      16-Oct-2020
 * \author  (original)  Behrouz NematiPour
 * \date    (original)  11-Feb-2020
 *
 */

// Qt
import QtQuick 2.12

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

/*!
 * \brief   Contains the and Auto Hide Dialog Implementation
 *          for a quick information for user
 *          and will be hidden in a second
 */
ModalDialog { id : _root
    contentItem.objectName: "AutoHideInfoDialog"  //SquishQt testability

    property string message: "<message>"

    autoHide: true

    TitleText { id: _titleText
        anchors.centerIn: parent
        width: parent.width
        text: message
    }

    function showDialog(vMessage, vDuration) {
        _root.message = vMessage
        _root.autoHideDuration = vDuration
        _root.open()
    }
}
