// Qt
import QtQuick 2.12

import "qrc:/globals"
import "qrc:/components"

TouchRect { id  : _root

    // arrow type must be set externally
    property bool upArrow       :   false
    property bool downArrow     :   false
    property bool leftArrow     :   false
    property bool rightArrow    :   false
    property bool expandingArrow:   false

    property string  iconImage  :   upArrow         ?   "qrc:/images/iChevronUp"        :
                                    downArrow       ?   "qrc:/images/iChevronDown"      :
                                    leftArrow       ?   "qrc:/images/iChevronLeft"      :
                                    rightArrow      ?   "qrc:/images/iChevronRight"     :
                                    expandingArrow  ?   "qrc:/images/iArrowsExpanding"  :
                                                        ""

    property int    iconSize    : Variables.arrowIconDiameter

    isDefault       : true
    height          : iconSize + 20
    width           : height
    radius          : height

    Image { id  : _iconImage
        anchors.centerIn: parent
        height          : iconSize
        width           : iconSize
        fillMode        : Image.PreserveAspectFit
        source          : iconImage
    }
}
