import{_ as e}from"./index.js?v=1764830988434";import{a as t}from"./public.js?v=1764830988434";import{T as a}from"./terminal2.js?v=1764830988434";import{k as o,P as s,i as n,r as l,av as r,w as i,a2 as m,V as u,a3 as c,W as p,U as f,ak as d,n as v}from"./vue.js?v=1764830988434";import"./common.js?v=1764830988434";import"./__commonjsHelpers__.js?v=1764830988434";import"./page_layout.js?v=1764830988434";import"./naive.js?v=1764830988434";import"./xterm.js?v=1764830988434";import"./xterm-addon-canvas.js?v=1764830988434";const j=o({__name:"Terminal",setup(o,{expose:j}){const{t:_}=s(),h=n("fileStore"),{currentPath:w}=h,x=l(!1),M=l({id:"1",host:"127.0.0.1",port:22,ps:"",state:!0}),k=r("terminalRef"),C=l(!1);function P(){return t({title:_("file.terminalModal.closeTitle"),content:_("file.terminalModal.closeMessage"),width:420,onConfirm(){x.value=!1,v(()=>C.value=!1)}}),!1}function T(e){e.indexOf("Welcome to")&&(C.value=!0)}return i(C,e=>{var t;e&&(null==(t=k.value)||t.send("cd ".concat(w.value," \r\n")))}),j({open:function(){x.value=!0},close:P}),(t,o)=>{const s=e;return u(),m(s,{show:f(x),"onUpdate:show":o[0]||(o[0]=e=>d(x)?x.value=e:null),title:f(_)("file.terminalModal.title"),width:926,onPublicClose:P},{default:c(()=>[p(a,{ref_key:"terminalRef",ref:k,data:f(M),onConnectSuccess:T},null,8,["data"])]),_:1},8,["show","title"])}}});export{j as default};
