System.register(["./index-legacy-C_9lLSB4.js?v=1773287522785","./index-legacy-Cv0QQQJ6.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./useLoading-legacy-IiShPpjk.js?v=1773287522785","./index-legacy-IyGqcGvi.js?v=1773287522785","./useSocket-legacy-D9BDJ2id.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-CvnE2rtV.js?v=1773287522785","./check-legacy-DG4HeWug.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BSBh0Le2.js?v=1773287522785","./index-legacy-DGWsVoxN.js?v=1773287522785","./index-legacy-DEYz4m3y.js?v=1773287522785","./data-legacy-B9xdUIE5.js?v=1773287522785"],(function(e,l){"use strict";var a,n,s,u,t,i,c,r,g,o,p,v,_,d,y,j,x;return{setters:[e=>{a=e._},e=>{n=e._},e=>{s=e.i},e=>{u=e.u},e=>{t=e.g,i=e.a},e=>{c=e.u},e=>{r=e.k,g=e.t,o=e.R,p=e.c,v=e.r,_=e.$,d=e.Z,y=e.a0,j=e.X,x=e.S},null,null,null,null,null,null,null,null,null],execute:function(){const l={class:"p-20px"};e("default",r({__name:"index",props:{app:{}},setup(e){const r=g(e,"app"),{t:f}=o(),m=p((()=>"initializing"===r.value.status)),k=v(m.value?"install":"run"),h=[{key:"run",show:!m.value,label:f("Docker.App.index_5")},{key:"install",label:f("Docker.App.index_6")}],b=v(""),{loading:w,setLoading:z}=u(),S=()=>{Z(k.value)},Z=e=>{switch(e){case"run":(async()=>{try{z(!0),b.value="";const{message:e}=await t({service_name:r.value.service_name,app_name:r.value.appname});s(e)&&(b.value=e.result)}finally{z(!1)}})();break;case"install":m.value?L():(async()=>{try{z(!0),b.value="";const{message:e}=await i({service_name:r.value.service_name});s(e)&&(b.value=e.result)}finally{z(!1)}})()}},{open:$,send:A,close:D}=c("/sock_shell",{immediate:!1,onMessage:(e,l)=>{const{data:a}=l;b.value+=l.data,(a.includes("bt_successful")||a.includes("bt_failed"))&&D()}}),L=()=>{const e=r.value.appinfo.filter((e=>"installed_log"===e.fieldKey));e.length>0&&(b.value="",D(),$(),A(`tail -f ${e[0].fieldValue}`))};return S(),(e,s)=>{const u=n,t=a;return _(),d("div",l,[y(u,{value:x(k),"onUpdate:value":[s[0]||(s[0]=e=>j(k)?k.value=e:null),Z],options:h,onClick:S},null,8,["value"]),y(t,{class:"h-468px",lang:"log","font-size":12,loading:x(w),content:x(b)},null,8,["loading","content"])])}}}))}}}));
