import QtQuick 2.12
import BTPhone 1.0
import QtQuick.Controls 2.15

Item {
    id: root
    width: Constants.width
    height: Constants.height * 0.8

    property string subState: parent.state

    ContentListView {
        id: contentListView
        anchors.fill: parent
        rootState: parent.subState
    }

    ContentNoListView {
        id: contentNoListView
        visible: false
        anchors.fill: parent
        noListState: parent.subState
    }

    ContentNoRCNTView {
        id: contentNoRCNTView
        visible: false
        rootState: parent.subState
    }

    states: [
        State {
            name: "MainScreen"
        },
        State {
            name: "NoList"

            PropertyChanges {
                target: contentListView
                visible: false
            }

            PropertyChanges {
                target: contentNoListView
                visible: true
            }
        },
        State {
            name: "NoCallHistory"

            PropertyChanges {
                target: contentListView
                visible: false
            }

            PropertyChanges {
                target: contentNoRCNTView
                visible: true
            }
        }
    ]
}

/*##^##
Designer {
    D{i:0;height:320;width:800}
}
##^##*/

