Object.defineProperty(exports, "__esModule", { value: true });
module.exports = function (ActionAPI) {
    ActionAPI.onExecute(function (properties, status) {
    });
    ActionAPI.onOpenEditor(function (EditorAPI, properties) {
        var connectionField = {
            id: "connectionID",
            name: "Connection",
            type: "connection",
            connectionType: "pjlink",
            value: properties.connectionID != undefined ? properties.connectionID : 'none'
        };
        var stateField = {
            id: 'state',
            name: "State",
            type: 'select',
            values: [{ id: "on", text: "Power On" }, { id: "off", text: "Power Off" }],
            value: properties.state != undefined ? properties.state : 'on'
        };
        EditorAPI.onFieldChanges(function (fields) {
            var fieldObject = EditorAPI.tools.objectifyFieldsValues(fields);
            EditorAPI.saveProperties({ connectionID: fieldObject.connectionID, state: fieldObject.state });
        });
        EditorAPI.setFields([connectionField, stateField]);
    });
};
//# sourceMappingURL=setPower.js.map