"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `sos.osd` API groups together methods for working with the signageOS OSD (On Screen Display).
 *
 * More information about the OSD can be found in the [OSD Introduction](https://docs.signageos.io/hc/en-us/articles/4405231839890-OSD-menu-by-signageOS)
 *
 * <details>
 *     <summary>Front OSD Capabilities</summary>
 * 		| Capability | Description |
 * 		|:------------|:-------------|
 * 		| `FRONT_OSD` | If device supports opening OSD |
 *
 * 		If you want to check if the device supports this capability, use [`sos.display.supports()`](https://developers.signageos.io/sdk/sos/display#supports).
 * </details>
 */
class OSD {
    messagePrefix;
    postMessage;
    static MESSAGE_PREFIX = 'osd';
    /** @internal */
    constructor(messagePrefix, postMessage) {
        this.messagePrefix = messagePrefix;
        this.postMessage = postMessage;
    }
    /**
     * The `showOSD()` method opens the OSD without typing the pin.
     * Note: The OSD will be opened after 6 seconds.
     *
     * @returns {Promise<void>} A promise that resolves when the OSD is shown.
     * @since 5.5.0
     */
    async showOSD() {
        await this.postMessage({
            type: this.getMessage('show_osd'),
        });
    }
    getMessage(name) {
        return this.messagePrefix + '.' + OSD.MESSAGE_PREFIX + '.' + name;
    }
}
exports.default = OSD;
//# sourceMappingURL=OSD.js.map