"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.JavascriptPlugin = void 0;
const index_js_1 = require("../../types/index.js");
const constants_js_1 = require("./constants.js");
const JavascriptPluginVersions = {
    V1: '0.0.1'
};
exports.JavascriptPlugin = {
    id: index_js_1.LanguagePluginID.JavaScript,
    name: 'JavaScript',
    moduleName: 'JavascriptPlugin',
    modulePath: 'plugins/javascript/JavascriptPlugin',
    iconLocation: `${constants_js_1.PUBLIC_INTEGRATIONS_LOGO_URL}/javascript.png`,
    type: index_js_1.PluginType.CODE,
    responseType: index_js_1.PluginResponseType.JSON,
    hasRawRequest: true,
    rawRequestName: 'Executed code',
    datasourceTemplate: {
        sections: []
    },
    actionTemplate: {
        sections: [
            {
                name: 'main',
                items: [
                    {
                        name: 'body',
                        label: '',
                        startVersion: JavascriptPluginVersions.V1,
                        componentType: index_js_1.FormComponentType.CODE_EDITOR,
                        language: index_js_1.EditorLanguage.JAVASCRIPT,
                        initialValue: `/*
 * You can use JavaScript Functions to:
 *   1. Transform the output of previous Steps by referencing their output (ex. Step1.output)
 *   2. Write business logic referencing UI components (ex. Table1.selectedRow.id)
 *   3. Make http calls via axios
 *
 * Learn more in the docs: https://docs.superblocks.com/backend-apis/javascript
 */

const obj = {str: "hello world"};
console.log(obj.str);
return obj;
`,
                        rules: [{ required: true, message: 'Function body is required' }]
                    }
                ]
            }
        ]
    }
};
//# sourceMappingURL=javascript.js.map