import{_ as e}from"./index.js?v=1763625242172";import{a as t}from"./public.js?v=1763625242172";import{T as a}from"./terminal2.js?v=1763625242172";import{k as o,P as s,i as n,r as l,av as r,w as i,R as m,a2 as u,a3 as c,X as p,V as f,aj as d,n as j}from"./vue.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./page_layout.js?v=1763625242172";import"./naive.js?v=1763625242172";import"./xterm.js?v=1763625242172";import"./xterm-addon-canvas.js?v=1763625242172";const v=o({__name:"Terminal",setup(o,{expose:v}){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}),C=r("terminalRef"),P=l(!1);function R(){return t({title:_("file.terminalModal.closeTitle"),content:_("file.terminalModal.closeMessage"),width:420,onConfirm(){x.value=!1,j((()=>P.value=!1))}}),!1}function T(e){e.indexOf("Welcome to")&&(P.value=!0)}return i(P,(e=>{var t;e&&(null==(t=C.value)||t.send("cd ".concat(w.value," \r\n")))})),v({open:function(){x.value=!0},close:R}),(t,o)=>{const s=e;return m(),u(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:R},{default:c((()=>[p(a,{ref_key:"terminalRef",ref:C,data:f(M),onConnectSuccess:T},null,8,["data"])])),_:1},8,["show","title"])}}});export{v as default};
