import QtQuick 2.12
import BTPhone 1.0
import FlowView 1.0

FlowItem {
    id: flowItem
    width: Constants.width
    height: Constants.height

    BT_RCNTContent {
        id: bT_RCNTContent
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.top: topTabBar.bottom
        state: "NoList"
        anchors.rightMargin: 0
        anchors.leftMargin: 0
    }

    TopTabBar {
        id: topTabBar
        anchors.left: parent.left
        anchors.top: statusBar.bottom

        Connections {
            target: topTabBar.menuBtn
            onClicked: menuListView.visible = (menuListView.visible ? false : true)
        }
    }

    Home_Status_001 {
        id: statusBar
        anchors.left: parent.left
        anchors.top: parent.top
    }

    MouseArea {
        id: mouseArea
        anchors.fill: parent
        enabled: menuListView.visible

        Connections {
            target: mouseArea
            onClicked: menuListView.visible = false
        }
    }

    MenuListView {
        id: menuListView
        visible: false
        anchors.top: topTabBar.bottom
        x: parent.width - topTabBar.menuBtn.width - width
    }

    states: [
        State {
            name: "Dialed"
        },
        State {
            name: "Received"
        },
        State {
            name: "Missed"
        }
    ]
}
