import{c as e,r as a,o as s,v as l,N as o,B as t,e as m,y as u,z as d,ab as r,U as p,a9 as i}from"./base-lib.js?v=1761009159";import{P as c,hf as n,ax as f}from"./utils-lib.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";const _=e({__name:"shell-type-select",props:{compData:{default:()=>({})}},emits:["close"],setup(e,{expose:_,emit:b}){const h=e,y=b,{row:{id:v}}=h.compData,V=a(),j=s({type:"bash",sudo:!1});return _({onConfirm:async()=>{await V.value.validate(),await c({request:n({id:v,shell:j.type,sudo_i:j.sudo?1:0}),success:e=>{h.compData.openTerminalLog(e.msg),e.status&&y("close")}})}}),(e,a)=>{const s=f,c=r,n=p,_=i;return l(),o(_,{ref_key:"shellFormRef",ref:V,class:"p-[2rem]",model:u(j)},{default:t(()=>[m(c,{label:"请选择shell"},{default:t(()=>[m(s,{modelValue:u(j).type,"onUpdate:modelValue":a[0]||(a[0]=e=>u(j).type=e),options:[{label:"Bash",value:"bash"},{label:"sh",value:"sh"}],class:"!w-[20rem]"},null,8,["modelValue"])]),_:1}),m(c,{label:" "},{default:t(()=>[m(n,{modelValue:u(j).sudo,"onUpdate:modelValue":a[1]||(a[1]=e=>u(j).sudo=e)},{default:t(()=>a[2]||(a[2]=[d("div",{class:"flex items-center"},"使用root权限执行",-1)])),_:1,__:[2]},8,["modelValue"])]),_:1})]),_:1},8,["model"])}}});export{_ as default};
