import{c,d as f,b as r,B as h}from"./button-D4VgS8ri.js";import{j as e}from"./main.js";import{B as b}from"./badge-C9rqaanl.js";import{d as g}from"./dayjs.min-CLBNIDGD.js";import{C as p}from"./circle-x-B_YU-CFf.js";import{L as k}from"./loader-circle-CEJBtRy6.js";import{R as N}from"./refresh-cw-0SLBx65v.js";import{C as j}from"./clock-CpEEWMJT.js";const y=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],u=c("circle-check",y);const C=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],I=c("power-off",C);const w=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],O=c("power",w);const M=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],B=c("rocket",M),S={IN_PROGRESS:{icon:k,labelSuffix:"pipelineInProgress",badgeClass:"bg-blue-50 text-blue-700 dark:bg-blue-950/40 dark:text-blue-300",iconClass:"animate-spin text-blue-500",dotClass:"bg-blue-400"},APPROVED:{icon:u,labelSuffix:"pipelineApproved",badgeClass:"bg-emerald-50 text-emerald-700 dark:bg-emerald-950/40 dark:text-emerald-300",iconClass:"text-emerald-500",dotClass:"bg-emerald-400"},REJECTED:{icon:p,labelSuffix:"pipelineRejected",badgeClass:"bg-red-50 text-red-700 dark:bg-red-950/40 dark:text-red-300",iconClass:"text-red-500",dotClass:"bg-red-400"}};function T({pipelineInfo:t,compact:i=!1,translationPrefix:l="skill",onRefresh:o,refreshing:m}){const{t:d}=f();if(!t)return i?null:e.jsx("p",{className:"text-xs text-muted-foreground py-2",children:d(`${l}.pipelineNone`)});const a=S[t.status],n=a.icon;if(i)return e.jsxs(b,{className:r("text-[10px] px-1.5 py-0 h-4 font-medium border-0 gap-1",a.badgeClass),children:[e.jsx(n,{className:r("h-2.5 w-2.5",a.iconClass)}),d(`${l}.${a.labelSuffix}`)]});const x=t.pipeline||[];return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{className:r("h-4 w-4",a.iconClass)}),e.jsx("span",{className:"text-sm font-medium",children:d(`${l}.${a.labelSuffix}`)}),t.status==="IN_PROGRESS"&&o&&e.jsx(h,{variant:"ghost",size:"icon",className:"h-6 w-6 ml-auto",onClick:o,disabled:m,children:e.jsx(N,{className:r("h-3.5 w-3.5",m&&"animate-spin")})})]}),x.length>0&&e.jsx("div",{className:"space-y-2",children:x.map(s=>e.jsxs("div",{className:"flex items-start gap-2.5 rounded-md border bg-muted/20 px-3 py-2",children:[s.passed?e.jsx(u,{className:"h-3.5 w-3.5 mt-0.5 shrink-0 text-emerald-500"}):e.jsx(p,{className:"h-3.5 w-3.5 mt-0.5 shrink-0 text-red-500"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs font-medium font-mono",children:s.nodeId}),s.durationMs!=null&&e.jsx("span",{className:"text-[10px] text-muted-foreground",children:s.durationMs>=1e3?`${(s.durationMs/1e3).toFixed(1)}s`:`${s.durationMs}ms`})]}),s.message&&e.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5 break-words",children:s.message}),s.executedAt&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground/70 mt-0.5",children:[e.jsx(j,{className:"h-2.5 w-2.5"}),g(s.executedAt).format("YYYY-MM-DD HH:mm:ss")]})]})]},s.nodeId))})]})}export{u as C,T as P,B as R,I as a,O as b};
