import{G as c}from"./firewall-jQIxKxfN.js?v=1773287522785";import{i as p,m as n}from"./index-BTglIPU2.js?v=1773287522785";import{k as u,r as m,o as d,K as f,$ as g,Z as h,_,S as v}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./naive-ui--dJnpVcV.js?v=1773287522785";const w={class:"h-300px"},F=["innerHTML"],E=u({__name:"log",props:{data:{}},setup(o){const s=o,a=m("None"),i=async()=>{if(!s.data.path)return;const{message:t}=await c({filename:s.data.path});if(p(t)){a.value=t.result.replace(/\n/g,"<br/>");const r=a.value.includes("FireWall Migrate Service Finish"),l=a.value.includes("FireWall Migrate Error");(r||l)&&(e&&(clearInterval(e),e=null),r?(n.success("Firewall data migrated successfully"),setTimeout(()=>{window.location.reload()},2e3)):n.error("Firewall data migration failed"))}};i();let e=null;return d(()=>{e=setInterval(()=>{i()},1e3)}),f(()=>{e&&clearInterval(e)}),(t,r)=>(g(),h("div",w,[_("pre",{innerHTML:v(a),class:"h-full overflow-auto bg-black text-white p-10px whitespace-pre-wrap"},null,8,F)]))}});export{E as default};
