"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `sos.monitors` API groups together methods for providing information about monitors connected to the device.
 *
 * :::note
 * This API is available only on Linux devices.
 * :::
 */
class Monitors {
    messagePrefix;
    postMessage;
    static MESSAGE_PREFIX = 'monitors';
    /** @internal */
    constructor(messagePrefix, postMessage) {
        this.messagePrefix = messagePrefix;
        this.postMessage = postMessage;
    }
    /**
     * The `getList()` method returns a list of monitors currently connected to the device.
     *
     * @returns {Promise<IConnectedMonitor[]>} A promise that resolves to an array of connected monitors.
     * @since 4.0.0
     */
    async getList() {
        const { monitors } = await this.postMessage({
            type: this.getMessage('get_list'),
        });
        return monitors;
    }
    getMessage(name) {
        return this.messagePrefix + '.' + Monitors.MESSAGE_PREFIX + '.' + name;
    }
}
exports.default = Monitors;
//# sourceMappingURL=Monitors.js.map