text: "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[697],{697:(e,t,a)=>{a.r(t),a.d(t,{default:()=>u});var n=a(757),r=a.n(n);function i(e,t,a,n,r,i,s){try{var l=e[i](s),u=l.value}catch(e){return void a(e)}l.done?t(u):Promise.resolve(u).then(n,r)}function s(e){return function(){var t=this,a=arguments;return new Promise((function(n,r){var s=e.apply(t,a);function l(e){i(s,n,r,l,u,"next",e)}function u(e){i(s,n,r,l,u,"throw",e)}l(void 0)}))}}const l={name:"Variables",data:function(){return{variables:[]}},mounted:function(){this.getVariables()},methods:{save:function(){var e=this;return s(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,axios.post("/save-variables/".concat(e.id),{variables:e.variables});case 2:return t.next=4,e.getVariables();case 4:case"end":return t.stop()}}),t)})))()},getVariables:function(){var e=this;return s(r().mark((function t(){var a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,axios.get("/get-variables/".concat(e.id));case 2:a=t.sent,e.variables=a.data.variables||[],e.variables.length||e.variables.push({key:"",initial_value:"",current_value:""});case 5:case"end":return t.stop()}}),t)})))()}},computed:{id:function(){return this.$route.params.id}}};const u=(0,a(900).Z)(l,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-container",[a("v-row",[a("v-col",[a("v-btn",{on:{click:e.save}},[e._v("save")])],1)],1),e._v(" "),e._l(e.variables,(function(t,n){return a("v-row",{key:n,attrs:{"no-gutters":""}},[a("v-col",{attrs:{cols:"3"}},[a("v-text-field",{attrs:{"prepend-icon":"mdi-plus",outlined:""},on:{"click:prepend":function(t){return e.variables.push({key:"",initial_value:"",current_value:""})}},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"variable.key"}})],1),e._v(" "),a("v-col",[a("v-text-field",{attrs:{outlined:""},model:{value:t.initial_value,callback:function(a){e.$set(t,"initial_value",a)},expression:"variable.initial_value"}})],1),e._v(" "),a("v-col",[a("v-text-field",{attrs:{outlined:""},model:{value:t.current_value,callback:function(a){e.$set(t,"current_value",a)},expression:"variable.current_value"}})],1)],1)}))],2),e._v(" "),a("h1",[e._v(e._s(e.variables))])],1)}),[],!1,null,"1725369e",null).exports}}]);