//@ pragma UseQApplication
import Quickshell
import Quickshell.Io
import QtQuick
import QtQuick.Layouts
import Quickshell.Widgets
import Quickshell.Hyprland

import "widgets" as Widgets
import "widgets/player" as Player
import "widgets/common" as Common
import "widgets/clock" as Clock
import "widgets/workspace" as Workspace

PanelWindow {
    property var modelData
    screen: modelData.values[0]

    color: Qt.rgba(0, 0, 0, 0) // Fully transparent via zero alpha
    anchors {
        top: true
        left: true
        right: true
    }

    implicitHeight: 31
    RowLayout {
        visible: true
        height: 30
        anchors {
            top: parent.top
            left: parent.left
            right: parent.right
            // bottomMargin: 2
            leftMargin: 5
            rightMargin: 5
        }
        RowLayout {
            // Left
            Layout.alignment: Qt.AlignLeft
            Widgets.Workspaces {}
        }
        RowLayout {
            // Center
            Layout.alignment: Qt.AlignCenter
        }
        RowLayout {
            // Right
            Layout.alignment: Qt.AlignRight
            Widgets.Demo {}
        }
    }
    // Rectangle {
    //     anchors {
    //         bottom: parent.bottom
    //         left: parent.left
    //         right: parent.right
    //     }
    //     height: 1
    //     color: "#8d8d8d"
    // }
}
