import QtQuick 2.12
import BTPhone 1.0
import QtQuick.Controls 2.15

Item {
    id: noList
    width: 800
    height: 320
    property alias noListState: noList.state

    Rectangle {
        id: bg
        color: "#ffffff"
        anchors.fill: parent1
    }

    TabBar {
        id: bottomTab
        position: TabBar.Footer
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.bottom: parent.bottom

        TabButton {
            id: allTab
            text: qsTr("All")
        }

        TabButton {
            id: dialedTab
            text: qsTr("Dialed")
        }

        TabButton {
            id: receivedTab
            text: qsTr("Received")
        }

        TabButton {
            id: missedTab
            text: qsTr("Missed")
        }
    }

    Text {
        id: noListText
        x: 187
        y: 115
        text: qsTr("No Received Calls")
        anchors.verticalCenter: parent.verticalCenter
        font.pixelSize: 50
        anchors.horizontalCenter: parent.horizontalCenter
    }
    states: [
        State {
            name: "Dialed"

            PropertyChanges {
                target: bottomTab
                currentIndex: 1
            }

            PropertyChanges {
                target: noListText
                text: qsTr("No Dialed Calls")
            }
        },
        State {
            name: "Received"

            PropertyChanges {
                target: bottomTab
                currentIndex: 2
            }
        },
        State {
            name: "Missed"
            PropertyChanges {
                target: bottomTab
                currentIndex: 3
            }

            PropertyChanges {
                target: noListText
                text: qsTr("No Missed Calls")
            }
        }
    ]
}



