(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b3089"],{"273a":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"ml-30"},[i("div",{staticClass:"tabs ac-tabs is-line"},[i("ul",[i("li",{class:{"is-active":"file"===e.activeTab}},[i("a",{on:{click:function(t){t.preventDefault(),e.activeTab="file"}}},[i("span",[e._v("File")])])]),i("li",{class:{"is-active":"preview-changes"===e.activeTab}},[i("a",{on:{click:function(t){t.preventDefault(),e.activeTab="preview-changes"}}},[i("span",[e._v("Preview Changes")])])])])]),"file"===e.activeTab?i("div",[i("monaco-editor",{ref:"monacoEditor",staticClass:"editor-writable vh-80 is-clipped",attrs:{options:{minimap:{enabled:!0},theme:e.editorTheme,readOnly:!1},"diff-editor":"preview-changes"===e.activeTab,language:"yaml"},on:{editorDidMount:e.onEditorMount},model:{value:e.valueString,callback:function(t){e.valueString=t},expression:"valueString"}})],1):i("div",[i("monaco-editor",{key:e.activeTab,ref:"monacoDiffEditor",staticClass:"editor-writable vh-80 is-clipped",attrs:{options:{minimap:{enabled:!0},theme:e.editorTheme,readOnly:!0},value:e.valueString,"diff-editor":!0,original:e.originalValueString,language:"yaml"}})],1)])},n=[],o=i("ae5a"),l=i("651e"),r=i.n(l),c=i("059c"),s={name:"yaml-form",props:{value:{type:null,default:function(){return{}}}},mixins:[o["a"]],inject:["theme"],components:{MonacoEditor:c["a"]},data:function(){return{activeTab:"file",valueString:""}},computed:{originalValueString:function(){return r.a.safeDump(this.referenceModel,{lineWidth:2e3})},editorTheme:function(){return"dark"===this.theme?"vs-".concat(this.theme):"vs"}},methods:{initValueString:function(){this.valueString=r.a.safeDump(this.value,{lineWidth:2e3})},updateModelData:function(){var e=null;try{e=r.a.safeLoad(this.valueString,{json:!0})}catch(t){e=this.modelData}this.modelData=e,this.$emit("code::model-data-updated",e)},onEditorMount:function(){var e=this.$refs.monacoEditor.getEditor();e.onDidBlurEditorText(this.updateModelData)}},created:function(){this.initValueString()},watch:{value:function(){this.initValueString()}}},u=s,d=i("2877"),v=Object(d["a"])(u,a,n,!1,null,null,null);t["default"]=v.exports}}]);
//# sourceMappingURL=chunk-2d0b3089.1fd36573.js.map