import{_ as w}from"./gjovfe2x.js";import{u as _}from"./-nPXbNd_.js";import{d as b,g as t,q as r,J as I,c as h,l as S,m as a,o as C}from"./B08CJtNn.js";const v=b({__name:"CrawlerSmallProgress",props:{crawlId:{default:""},status:{},count:{},depth:{},crawlerQueue:{},crawlerId:{}},setup(u){const i=_(),e=u,l=t(()=>e.crawlId.length===0?e.status:i.crawlerStatusForCurrentProject?.find(s=>s.crawlId===e.crawlId)?.status),c=t(()=>{const s={start:"info",run:"info",queued:"info",waiting:"info",finished:"success",running:"info",result:"success",results:"success",finish:"success",aborted:"error",abort:"error",error:"error"},n={start:r.icoLoadingSpinner,run:r.icoLoadingSpinner,queued:r.icoHourglass,waiting:r.icoHourglass,finished:r.icoFinished,running:r.icoLoadingSpinner,result:r.icoFinished,results:r.icoFinished,finish:r.icoFinished,aborted:"material-symbols:cancel-outline-rounded",abort:"material-symbols:cancel-outline-rounded",error:r.icoError};return{statusColorMap:s,statusIconMap:n}}),o=t(()=>{if(e.crawlerQueue&&e.crawlerId){const s=e.crawlerQueue.find(n=>n.crawlId===e.crawlerId);if(s)return s.status}return l.value||e.status}),d=t(()=>c.value.statusColorMap[o.value]),m=t(()=>c.value.statusIconMap[o.value]),{t:f}=I(),g=t(()=>f(`crawlerStatus.${o.value}`));return(s,n)=>{const p=w;return a(o)?(C(),h(p,{key:0,label:a(g),color:a(d),icon:a(m),variant:"subtle",size:"md"},null,8,["label","color","icon"])):S("",!0)}}}),B=Object.assign(v,{__name:"CrawlerSmallProgress"});export{B as _};
