"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleManagementNativeCommandsMdcRequests = handleManagementNativeCommandsMdcRequests;
const nativeMdcCommands_1 = require("./nativeMdcCommands");
function handleManagementNativeCommandsMdcRequests(onCommand, dispatch, frontApplet) {
    onCommand(async (commandEvent) => {
        switch (commandEvent.command.type) {
            case nativeMdcCommands_1.ManagementNativeCommandsMdcSendOneRequest:
                await dispatch({
                    type: nativeMdcCommands_1.ManagementNativeCommandsMdcSendOneResult,
                    result: await frontApplet.native.mdc.sendOne(commandEvent.command.ipAddress, commandEvent.command.codes, commandEvent.command.data),
                });
                break;
            default:
        }
    });
}
//# sourceMappingURL=handleNativeCommands.js.map