import QtQuick

Item {
    id: root

    property color pointColor: "#005FCC"
    property bool selected: false

    signal activated()

    implicitWidth: selected ? 16 : 10
    implicitHeight: implicitWidth

    Rectangle {
        anchors.centerIn: parent
        width: root.selected ? 14 : 8
        height: width
        radius: width / 2
        color: root.pointColor
        border.width: 2
        border.color: "#FFFFFF"

        Behavior on width {
            NumberAnimation { duration: 90 }
        }
    }

    MouseArea {
        anchors.fill: parent
        onClicked: root.activated()
    }
}
