import QtQuick

// Reusable icon button for LogoutMenu actions (eww center-btn)
Rectangle {
    id: root
    property string icon: ""
    signal activated()

    width: 26; height: 26; radius: 13
    color: ma.containsMouse ? "#f38ba8" : "#313244"

    Behavior on color { ColorAnimation { duration: 120 } }

    Text {
        anchors.centerIn: parent
        text: root.icon
        color: "#cdd6f4"
        font.pixelSize: 13
    }

    MouseArea {
        id: ma
        anchors.fill: parent
        hoverEnabled: true
        onClicked: root.activated()
        cursorShape: Qt.PointingHandCursor
    }
}
