import{b as e,x as l,f as a,g as s,h as t,t as n,k as o,F as p,y as i,n as c,C as g}from"./vendor.38cc6e40.js";const _={class:"log-panel"},r={class:"log-panel__header"},y={class:"log-panel__title"},u={class:"log-panel__subtitle"},d={key:0,class:"log-panel__empty"},m={class:"log-panel__time"},f={class:"log-panel__message"},b={__name:"LogPanel",props:{title:{type:String,default:"执行日志"},subtitle:{type:String,default:"记录初始化、搜索与任务执行过程。"},emptyText:{type:String,default:"当前还没有日志输出。"},logs:{type:Array,default:()=>[]}},emits:["clear"],setup(b){const v=b,h=e(null);return l((()=>v.logs.length),(async()=>{await g(),h.value&&(h.value.scrollTop=0)})),(e,l)=>(a(),s("section",_,[t("header",r,[t("div",null,[t("h3",y,n(b.title),1),t("p",u,n(b.subtitle),1)]),t("button",{class:"log-panel__clear",type:"button",onClick:l[0]||(l[0]=l=>e.$emit("clear"))}," 清空日志 ")]),t("div",{ref_key:"logBody",ref:h,class:"log-panel__body"},[b.logs.length?o("",!0):(a(),s("div",d,n(b.emptyText),1)),(a(!0),s(p,null,i(b.logs,((e,l)=>(a(),s("div",{key:`${e.time}-${l}`,class:c(["log-panel__item",`is-${e.type||"info"}`])},[t("span",m,"["+n(e.time)+"]",1),t("span",f,n(e.message),1)],2)))),128))],512)]))},__scopeId:"data-v-6ac4c0b8"};export{b as _};
