"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var a=h(require("react")),b=require("react-i18next"),c=h(require("./Operation")),d=require("carbon-components-react"),e=require("./../contexts/ApiHandler/index.js"),f=require("./../contexts/config/index.js"),g=["event","callbacks","operation","apps"];function h(a){return a&&a.__esModule?a:{default:a}}function i(){return i=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},i.apply(this,arguments)}function j(a,b){return o(a)||n(a,b)||l(a,b)||k()}function k(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(a,b){if(a){if("string"==typeof a)return m(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(a):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?m(a,b):void 0}}function m(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c<b;c++)d[c]=a[c];return d}function n(a,b){var c=null==a?null:"undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(null!=c){var d,e,f=[],g=!0,h=!1;try{for(c=c.call(a);!(g=(d=c.next()).done)&&(f.push(d.value),!(b&&f.length===b));g=!0);}catch(a){h=!0,e=a}finally{try{g||null==c["return"]||c["return"]()}finally{if(h)throw e}}return f}}function o(a){if(Array.isArray(a))return a}function p(a,b){if(null==a)return{};var c,d,e=q(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||Object.prototype.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function q(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||(e[c]=a[c]);return e}var r=function(b){var h=b.event,k=b.callbacks,l=b.operation,m=b.apps,n=p(b,g),o=(0,e.useApi)(),q=o.api,r=(0,f.useConfig)(),s=r.options;return l=JSON.parse(JSON.stringify(l)),l.openapi=q.openapi,a["default"].createElement("div",i({className:"callbacks-tab-content"},n),a["default"].createElement("div",{className:"eventName"},h),a["default"].createElement(d.Accordion,null,Object.keys(k).map(function(b){var e=j(Object.entries(k[b])[0],2),f=e[0],g=e[1];return a["default"].createElement(d.AccordionItem,{className:"callback-accordion",key:g,title:f.toUpperCase()+" "+b,open:!0},a["default"].createElement(c["default"],{api:l,operation:g,operationPath:b,operationMethod:f,options:s,apps:m,isCallback:!0}))})))},s=(0,b.withTranslation)()(r);exports["default"]=s;