(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{"../../packages/api-design/client-codegen/src/controllers/CodeCBController.js":function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return s}));var a,r=i("../../node_modules/mobx/lib/mobx.module.js"),o=i("./js/stores/get-store.js"),n=i("../../packages/api-design/client-codegen/src/services/CodegenService.js");let s=(l=(a=class{get editor(){let e=Object(o.getStore)("ActiveWorkspaceSessionStore").activeEditor,t=Object(o.getStore)("EditorStore").find(e);return t&&t.model}didCreate(){var e=Object(o.getStore)("ActiveWorkspaceSessionStore").activeEditor,t=Object(o.getStore)("EditorStore").find(e).id;this.editorId=t,this.getLanguageList()}getLanguageList(){let e,t,i=[],a={};n.default.getLanguages().then((r=>{e=r,e&&e.length&&(e.forEach((e=>{e.variants&&e.variants.length&&(e.variants.length>1?e.variants.forEach((r=>{t=e.label+" - "+r.key,i.push({id:JSON.stringify({language:e.key,variant:r.key}),name:t}),a[`${e.key}_${r.key}`]={displayName:t,editorMode:e.syntax_mode}})):(t=e.label.toLowerCase()!==e.variants[0].key.toLowerCase()?e.label+" - "+e.variants[0].key:e.label,i.push({id:JSON.stringify({language:e.key,variant:e.variants[0].key}),name:t}),a[`${e.key}_${e.variants[0].key}`]={displayName:t,editorMode:e.syntax_mode}))})),this.languageList=i,this.labelEditorMap=a)}))}}).prototype,d="editor",c=[r.computed],g=Object.getOwnPropertyDescriptor(a.prototype,"editor"),u=a.prototype,p={},Object.keys(g).forEach((function(e){p[e]=g[e]})),p.enumerable=!!p.enumerable,p.configurable=!!p.configurable,("value"in p||p.initializer)&&(p.writable=!0),p=c.slice().reverse().reduce((function(e,t){return t(l,d,e)||e}),p),u&&void 0!==p.initializer&&(p.value=p.initializer?p.initializer.call(u):void 0,p.initializer=void 0),void 0===p.initializer&&(Object.defineProperty(l,d,p),p=null),a);var l,d,c,g,u,p}}]);