import{_ as w}from"./BtsG96Qa.js";import{d as _,a8 as b,g as t,q as r,J as I,c as h,l as S,m as a,o as C}from"./Dk4AzF7j.js";const v=_({__name:"CrawlerSmallProgress",props:{crawlId:{default:""},status:{},count:{},depth:{},crawlerQueue:{},crawlerId:{}},setup(u){const i=b(),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"},o={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:o}}),n=t(()=>{if(e.crawlerQueue&&e.crawlerId){const s=e.crawlerQueue.find(o=>o.crawlId===e.crawlerId);if(s)return s.status}return l.value||e.status}),d=t(()=>c.value.statusColorMap[n.value]),f=t(()=>c.value.statusIconMap[n.value]),{t:g}=I(),m=t(()=>g(`crawlerStatus.${n.value}`));return(s,o)=>{const p=w;return a(n)?(C(),h(p,{key:0,label:a(m),color:a(d),icon:a(f),variant:"subtle",size:"md"},null,8,["label","color","icon"])):S("",!0)}}}),q=Object.assign(v,{__name:"CrawlerSmallProgress"});export{q as _};
