import{n as e,Q as t,_ as l}from"./utils-lib.js?v=1761009159";import{c as s,r as o,w as a,q as n,v as r,x as c,z as i,C as u,D as p,A as f,I as m,J as d,y as x,e as _,B as y,n as b,G as g}from"./base-lib.js?v=1761009159";const h=["innerHTML"],S={key:1,class:"flex-1 w-full p-0 bg-none whitespace-pre-line text-i text-disabled dark:text-[#ccc]"},v=l(s({__name:"index",props:{content:{default:""},isHtml:{type:Boolean,default:!1},autoScroll:{type:Boolean,default:!0},fullScreen:{type:[Object,Boolean],default:!1}},setup(l,{expose:s}){const v=l,w=o(null),H=o(!1),k=()=>{b(()=>{const e=w.value,{scrollHeight:t}=e;e.scrollTop=t})};a(()=>v.content,()=>{v.autoScroll&&k()},{immediate:!0});const B=e=>{v.fullScreen&&(H.value=e)},j=()=>v.content,C=()=>{e({title:v.fullScreen.title,area:"100%",showFooter:!1,closeBtn:2,customClass:"full-screen-dialog",component:()=>t(()=>import("./full-screen.js?v=1761009159"),__vite__mapDeps([]),import.meta.url),compData:{isHtml:v.isHtml,autoScroll:v.autoScroll,onRefresh:v.fullScreen.onRefresh,getContent:j}})};return n(()=>{v.autoScroll&&k()}),s({setScrollBottom:k}),(e,t)=>{const l=g;return r(),c("div",{class:"w-full h-full relative",onMouseover:t[0]||(t[0]=e=>B(!0)),onMouseleave:t[1]||(t[1]=e=>B(!1))},[i("pre",{ref_key:"preRef",ref:w,style:{height:"100%"},class:"w-full flex items-start py-[1rem] px-4 overflow-y-auto bg-[#111] log-box leading-[20px] !rounded-large text-small"},[t[2]||(t[2]=u("\t\t\t",-1)),e.isHtml?(r(),c("code",{key:0,class:"flex-1 w-full p-0 bg-none whitespace-pre-line text-i text-disabled dark:text-[#ccc]",innerHTML:e.content||"暂无日志"},null,8,h)):p("",!0),t[3]||(t[3]=u("\n    \t",-1)),e.isHtml?p("",!0):(r(),c("code",S,f(e.content||"暂无日志"),1)),t[4]||(t[4]=u("\n\t\t",-1))],512),m(_(l,{type:"primary",class:"absolute",style:{top:"1rem",right:"1.5rem"},onClick:C},{default:y(()=>t[5]||(t[5]=[u(" 全屏展示 ",-1)])),_:1,__:[5]},512),[[d,x(H)]])],32)}}}),[["__scopeId","data-v-8e8d2211"]]);export{v as _};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = []
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
