import Quickshell
import QtQuick
import QtQuick.Layouts
import "../shared" as Shared

BarPill {
    id: root

    readonly property var player: Shared.Media.activePlayer

    visible: player !== null
    groupName: "media"
    accentColor: Shared.Theme.green

    content: [
        Text {
            Layout.alignment: Qt.AlignHCenter
            text: {
                if (!root.player) return "\u{f075a}";
                if (root.player.isPlaying) return "\u{f040a}";
                return "\u{f03e4}";
            }
            color: Shared.Theme.green
            font.pixelSize: Shared.Theme.fontLarge
            font.family: Shared.Theme.iconFont
        }
    ]
}
