import Quickshell
import QtQuick
import qs.config
import qs.services

FloatingWindow {
    id: root

    readonly property var myHomeDiagnostics: settingsShell.myHomeDiagnostics

    title: "Settings"
    visible: ShellState.settingsOpen
    implicitWidth: 1120
    implicitHeight: 760
    minimumSize: Qt.size(900, 620)
    color: Theme.alpha(Theme.bg, 0)

    onVisibleChanged: {
        if (visible) {
            SystemSettings.refresh();
        } else if (ShellState.settingsOpen) {
            // Keep Super+I deterministic after compositor close/Alt+F4.
            ShellState.closeSettings();
        }
    }

    SettingsShell {
        id: settingsShell
        anchors.fill: parent
        hostWindow: root
    }
}
