import{_ as g}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{gG as C,i as $,p as D}from"./index-BTglIPU2.js?v=1773287522785";import{_ as B}from"./index.vue_vue_type_style_index_0_lang-DLVIGNLS.js?v=1773287522785";import{k as p,t as u,$ as f,Z as h,a0 as n,R as N,e as V,a9 as i,_ as d,S as t,j,aa as y}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a1 as O,a6 as R,al as S}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./xterm-dpUsuiNl.js?v=1773287522785";import"./xterm-addon-canvas-DELv9KNm.js?v=1773287522785";import"./useSocket-DTHwGZgK.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";const U={class:"w-full h-full"},E=p({__name:"terminal",props:{command:{default:""}},setup(a){const l=u(a,"command"),c=[{model_index:"btdocker",mod_name:"compose",def_name:"get_pull_log",ws_callback:111},"\r","cd /www/wwwroot\r\n","clear && ".concat(l.value,"\r\n"),"clear\r"];return(_,e)=>(f(),h("div",U,[n(B,{url:"/webssh",data:c})]))}}),G={class:"p-20px"},I={class:"w-200px mb-16px"},P=p({__name:"index",props:{id:{}},setup(a,{expose:m}){const l=a,{t:c}=N(),_=u(l,"id"),e=V({shell:"bash",sudo:!1}),b=[{label:"bash",value:"bash"},{label:"sh",value:"sh"}];return m({onConfirm:async()=>{const{message:o}=await C({id:_.value,shell:e.shell,sudo_i:e.sudo?1:0});$(o)&&D({title:c("Docker.Container.terminal.index_2"),width:800,height:500,data:{command:o.result},component:E})}}),(o,s)=>{const w=R,k=S,x=O,v=g;return f(),h("div",G,[n(v,null,{default:i(()=>[n(x,{label:o.$t("Docker.Container.terminal.index_1"),"show-feedback":!1},{default:i(()=>[d("div",null,[d("div",I,[n(w,{value:t(e).shell,"onUpdate:value":s[0]||(s[0]=r=>t(e).shell=r),options:b},null,8,["value"])]),n(k,{checked:t(e).sudo,"onUpdate:checked":s[1]||(s[1]=r=>t(e).sudo=r)},{default:i(()=>[j(y(o.$t("Docker.Container.terminal.index_4")),1)]),_:1},8,["checked"])])]),_:1},8,["label"])]),_:1})])}}});export{P as default};
