import{x as m,a as c,b as f}from"./xterm-dpUsuiNl.js?v=1773287522785";import{x as u}from"./xterm-addon-canvas-DELv9KNm.js?v=1773287522785";import{i as p,m as x}from"./index-BTglIPU2.js?v=1773287522785";import{k as A,r as _,o as k,b as w,$ as b,Z as h,_ as v}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./naive-ui--dJnpVcV.js?v=1773287522785";const g={class:"h-full"},S=A({__name:"index",props:{status:{},setProjectStatus:{}},setup(a){const s=a,t=_(null);let e,n;const r=()=>{e=new m.Terminal({cursorBlink:!0,fontSize:12,lineHeight:1.26,fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#333",foreground:"#ececec"}}),n=new c.FitAddon,i(),d()},i=()=>{e.loadAddon(n),e.loadAddon(new u.CanvasAddon),e.loadAddon(new f.WebLinksAddon),t.value&&e.open(t.value)},d=()=>{n.fit()},l=()=>{s.setProjectStatus(s.status,o=>{p(o)&&(o.data===-1&&x.success(o.msg),e.write(o.msg))})};return k(()=>{r(),l()}),w(()=>{e.dispose()}),(o,B)=>(b(),h("div",g,[v("div",{ref_key:"terminalRef",ref:t,class:"w-full h-full overflow-hidden rounded-b-4px"},null,512)]))}});export{S as default};
