import QtQuick
import Qt5Compat.GraphicalEffects

Item {
    id: item
    implicitWidth: 149
    implicitHeight: 108
    property url iconSource: "settings.png"
    property bool selected: false
    property bool showSoul: true
    readonly property color selectedColor: "#ffc90e"
    readonly property color unselectedColor: "#614e6b"
    state: selected ? "selected" : ""

    Image {
        id: originalImage
        source: "./setting_icons/" + item.iconSource
    }

    ColorOverlay {
        id: colorOverlay
        anchors.fill: originalImage
        source: originalImage
        color: item.selected ? item.selectedColor : item.unselectedColor
    }

    Image {
        id: soul
        source: "./soul_small.png"
        x: 19
        y: 42
        visible: item.showSoul && item.selected
    }
}
