import{_ as e}from"./index.vue_vue_type_script_setup_true_lang.js?v=1753954525509";import{f4 as a,c as s}from"./page_layout.js?v=1753954525509";import{u as l}from"./public.js?v=1753954525509";import{_ as o}from"./index.vue_vue_type_style_index_0_lang.js?v=1753954525509";import{k as t,t as n,U as r,V as d,Q as m,P as i,e as c,a2 as u,W as _,X as p,j as h,a3 as v}from"./vue.js?v=1753954525509";import{cG as f,_ as x,cA as b}from"./naive.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./xterm-addon-canvas.js?v=1753954525509";import"./xterm.js?v=1753954525509";const w={class:"w-full h-full"},j=t({__name:"terminal",props:{command:{default:""}},setup(e){const a=n(e,"command"),s=[{model_index:"btdocker",mod_name:"compose",def_name:"get_pull_log",ws_callback:111},"\r","cd /www/wwwroot\r\n","clear && ".concat(a.value,"\r\n"),"clear\r"];return(e,a)=>(r(),d("div",w,[m(o,{url:"/webssh",data:s})]))}}),k={class:"p-20px"},g={class:"w-200px mb-16px"},y=t({__name:"index",props:{id:{}},setup(o,{expose:t}){const w=o,{t:y}=i(),C=n(w,"id"),D=c({shell:"bash",sudo:!1}),U=[{label:"bash",value:"bash"},{label:"sh",value:"sh"}];return t({onConfirm:async()=>{const{message:e}=await a({id:C.value,shell:D.shell,sudo_i:D.sudo?1:0});s(e)&&l({title:y("Docker.Container.terminal.index_2"),width:800,height:500,data:{command:e.result},component:j})}}),(a,s)=>{const l=f,o=x,t=b,n=e;return r(),d("div",k,[m(n,null,{default:u((()=>[m(t,{label:a.$t("Docker.Container.terminal.index_1"),"show-feedback":!1},{default:u((()=>[_("div",null,[_("div",g,[m(l,{value:p(D).shell,"onUpdate:value":s[0]||(s[0]=e=>p(D).shell=e),options:U},null,8,["value"])]),m(o,{checked:p(D).sudo,"onUpdate:checked":s[1]||(s[1]=e=>p(D).sudo=e)},{default:u((()=>[h(v(a.$t("Docker.Container.terminal.index_4")),1)])),_:1},8,["checked"])])])),_:1},8,["label"])])),_:1})])}}});export{y as default};
