import type { DomicileHost } from "../domicile-host"; import type { On } from "./subscribe"; import type { System } from "./system-calls"; export type SessionListeners = { idlechange: () => void; lockchange: () => void; }; export type Session = { /** `undefined` until the compositor says. */ readonly idle: boolean | undefined; /** `undefined` until the compositor says. */ readonly locked: boolean | undefined; /** Lock the desk now; answered with `lockchange` once it shut. */ lock: () => void; /** * Offer a passphrase at a locked desk; answered with `lockchange` only when * it opened. Clear a lock screen on that event, never on its own check. */ unlock: (passphrase: string) => void; idleAfter: System["idleAfter"]; idleBeforeBlanking: System["idleBeforeBlanking"]; idleHolds: System["idleHolds"]; unlockRefusals: System["unlockRefusals"]; on: On; }; export type SessionHost = Pick; export declare const session: (host: SessionHost, calls: Pick) => Session;