import QtQuick 2.12

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

HeaderBarPopup { id: _root
    readonly property int progressCircleHeight  : 70

    contentItem: Row { id : _dialogRow
        anchors.centerIn    : parent

        Item { id: _progressItem
            height  : _root.progressCircleHeight
            width   : height

            SDCProgressItem { id: _SDC_progressItem
                anchors.fill        : parent
                circleShadowColor   : Colors.dialogShadowColor
                textColor           : Colors.dialogText
                percentFontSize     : 18
                totalFontSize       : 16
            }
        }

        Column { id : _dialogColumn
            Repeater { id: _repeater
                model: [("%1 (%2)") .arg(qsTr("SD-Card"))   .arg("MB"),
                        ("%1: %2")  .arg(qsTr("Free"))      .arg(Variables.sizeConverted( _GuiView.sdAvail, 1000, 3)),
                        ("%1: %2")  .arg(qsTr("Total"))     .arg(Variables.sizeConverted( _GuiView.sdTotal, 1000, 3))]

                delegate: Text {
                    anchors.right: _dialogColumn.right
                    color           : Colors.dialogText
                    text            : modelData
                    font.pixelSize  : Fonts.fontPixelDialogText
                }
            }
        }
    }
}
