
// Qt
import QtQuick 2.12
import QtGraphicalEffects 1.12

// Project
//  Qml imports
import "qrc:/globals"
import "qrc:/components"
import "qrc:/pages/rxmanager"
import "qrc:/pages/pretreatment/create"


Item { id: _root
    signal addProfile()
    property bool onShow: true
    property bool showCreateRx: false

    RxManagerHeader{id: _rxHeader
        anchors {
            top         : parent.top
            left        : parent.left
            right       : parent.right
            topMargin   :   Variables.defaultMargin * 2
            leftMargin  :   Variables.defaultMargin * 3
            rightMargin :   Variables.defaultMargin * 3
        }

        height: 100
        onShow: _root.onShow
        visible: ! showCreateRx
        onAddClicked:{
            addProfile()
        }
    }
    RxManagerList{
        id: _rxManagerListView
        anchors {
            left        : parent.left
            right       : parent.right
            bottom      : parent.bottom
            top         : _rxHeader.bottom
            leftMargin  : Variables.defaultMargin * 3
            rightMargin : Variables.defaultMargin * 3
            bottomMargin: Variables.notificationHeight + Variables.alarmDialogHeaderHeight
        }
        model: vRxProfiles.rxProfiles
    }
}
