import Quickshell
import Quickshell.Io
import QtQuick
import QtQuick.Layouts
import Quickshell.Widgets
import Quickshell.Services.Pipewire
import "common" as Common
import "clock" as Clock

Rectangle {
    id: backgroundRect
    implicitWidth: rowLayout.implicitWidth + 6 // Account for padding (2px left + 2px right)
    implicitHeight: rowLayout.implicitHeight + 4 // Account for padding (2px top + 2px bottom)
    color: Common.Colors.colors.background
    radius: 6.5 // Background rectangle with rounded corners
    // border.color: "gray"
    // border.width: 1

    // Inner Rectangle for padding and layout
    Rectangle {
        id: content
        anchors.fill: parent
        anchors.margins: 2 // Create 2px padding on all sides
        anchors.leftMargin: 3
        anchors.rightMargin: 3
        color: "transparent"

        RowLayout {
            id: rowLayout
            anchors.fill: parent
            Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter // Center content
            spacing: 10 // Space between items

            Audio {}
            Battery {}
						Common.VerticalSeprator {}
            Clock.Date {}
            Clock.Clock {}
        }
    }
}
