"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleDisplayRequests = handleDisplayRequests;
const displayCommands_1 = require("./displayCommands");
function handleDisplayRequests(onCommand, dispatch, frontApplet) {
    onCommand(async (commandEvent) => {
        switch (commandEvent.command.type) {
            case displayCommands_1.DisplaySupportsRequest:
                await dispatch({
                    type: displayCommands_1.DisplaySupportsResult,
                    supports: await frontApplet.display.supports(commandEvent.command.capability),
                });
                break;
            default:
        }
    });
}
//# sourceMappingURL=handleDisplayRequests.js.map