import{_ as e}from"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import{f$ as a,c as s}from"./page_layout.js?v=1763625242172";import{u as l}from"./public.js?v=1763625242172";import{_ as o}from"./index.vue_vue_type_style_index_0_lang.js?v=1763625242172";import{k as t,t as n,R as r,S as d,X as m,P as i,e as u,a3 as c,U as _,V as p,j as h,a4 as v}from"./vue.js?v=1763625242172";import{dV as f,_ as x,dP as b}from"./naive.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./xterm-addon-canvas.js?v=1763625242172";import"./xterm.js?v=1763625242172";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=u({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:c((()=>[m(t,{label:a.$t("Docker.Container.terminal.index_1"),"show-feedback":!1},{default:c((()=>[_("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:c((()=>[h(v(a.$t("Docker.Container.terminal.index_4")),1)])),_:1},8,["checked"])])])),_:1},8,["label"])])),_:1})])}}});export{y as default};
