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