import type { IDisposable, JsonObject, JsonValue } from "@elgato/utils"; import type { DialAction, KeyAction } from "./actions/index.js"; import { type PropertyInspectorDidAppearEvent, type PropertyInspectorDidDisappearEvent, SendToPluginEvent } from "./events/index.js"; /** * Controller capable of sending/receiving payloads with the property inspector, and listening for events. */ declare class UIController { #private; /** * Initializes a new instance of the {@link UIController} class. */ constructor(); /** * Gets the action associated with the current property. * @returns The action; otherwise `undefined` when a property inspector is not visible. */ get action(): DialAction | KeyAction | undefined; /** * Occurs when the property inspector associated with the action becomes visible, i.e. the user * selected an action in the Stream Deck application.. * @template T The type of settings associated with the action. * @param listener Function to be invoked when the event occurs. * @returns A disposable that, when disposed, removes the listener. */ onDidAppear(listener: (ev: PropertyInspectorDidAppearEvent) => void): IDisposable; /** * Occurs when the property inspector associated with the action disappears, i.e. the user unselected * the action in the Stream Deck application. * @template T The type of settings associated with the action. * @param listener Function to be invoked when the event occurs. * @returns A disposable that, when disposed, removes the listener. */ onDidDisappear(listener: (ev: PropertyInspectorDidDisappearEvent) => void): IDisposable; /** * Occurs when a message was sent to the plugin _from_ the property inspector. * @template TPayload The type of the payload received from the property inspector. * @template TSettings The type of settings associated with the action. * @param listener Function to be invoked when the event occurs. * @returns A disposable that, when disposed, removes the listener. */ onSendToPlugin(listener: (ev: SendToPluginEvent) => void): IDisposable; /** * Sends the payload to the property inspector; the payload is only sent when the property inspector * is visible for an action provided by this plugin. * @param payload Payload to send. */ sendToPropertyInspector(payload: JsonValue): Promise; } export declare const ui: UIController; export { type UIController };