"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var a=e(require("react")),b=require("../contexts/config"),c=require("carbon-components-react"),d=require("lodash");function e(a){return a&&a.__esModule?a:{default:a}}function f(a,b){return k(a)||j(a,b)||h(a,b)||g()}function g(){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 h(a,b){if(a){if("string"==typeof a)return i(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)?i(a,b):void 0}}function i(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 j(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 k(a){if(Array.isArray(a))return a}function l(){var e=(0,b.useConfig)(),g=e.options.headerTitle,h=(0,d.get)(e,"options.versions"),i=[];return h&&0<Object.values(h).length&&Object.entries(h).forEach(function(a){var b=f(a,2),c=b[0],d=b[1];i.push({text:c,url:d})}),a["default"].createElement("nav",{className:"apic--explorer-header","data-testid":"explorer-header"},a["default"].createElement("div",{className:"apic--explorer-header-brand-container"},a["default"].createElement("div",{className:"apic--brand-text"},"IBM ",a["default"].createElement("span",{className:"bold"},"API")," Connect"),h&&0<Object.values(h).length&&a["default"].createElement(c.Dropdown,{className:"apic--brand-text dropdown",label:g,onChange:function switchVersion(a){window.location.assign(a.selectedItem.url)},"data-testid":"version-picker",id:"version-picker",itemToString:function itemToString(a){return a?a.text:""},items:i}),(!h||0===Object.values(h).length)&&a["default"].createElement("div",{className:"apic--brand-text"},g)))}var m=l;exports["default"]=m;