import Quickshell
import Quickshell.Io
import QtQuick

import qs.config
import qs.services

ShellRoot {
    IpcHandler {
        target: "lock-screen-test"

        function status(): string {
            return JSON.stringify({
                generated: LockScreen.generated,
                path: LockScreen.path,
                fallback: LockScreen.fallback,
                lastError: LockScreen.lastError,
                busy: LockScreen.busy
            });
        }

        function burst(): void {
            DesktopPreferences.set("lockBlurLevel", 1);
            DesktopPreferences.set("lockBlurLevel", 2);
            DesktopPreferences.set("lockBlurLevel", 4);
        }

        function refresh(): void {
            LockScreen.refresh();
        }
    }
}
