import"react";import"react";import{Box as g,Flex as l,Link as k,Spinner as L,Text as p}from"@chakra-ui/react";import{CheckCircleIcon as b,ExternalLinkIcon as I,WarningIcon as T}from"@chakra-ui/icons";import{jsx as o,jsxs as d}from"react/jsx-runtime";var S=({failed:r,completed:e,inProgress:m,title:f,isLast:F,hasLink:h,link:i})=>d(l,{align:"center",h:10,children:[o(g,{h:1,w:1,bg:"foreground",borderRadius:"50%",position:"relative",_after:!F&&{content:'""',position:"absolute",top:"1",left:"50%",border:"1px solid",borderColor:e?"mutedForeground":"muted",height:"9",transform:"translateX(-50%)"}}),d(l,{alignItems:"center",children:[o(p,{ml:4,children:f}),h&&o(k,{href:i,isExternal:!0,children:o(I,{ml:"10px",cursor:"pointer"})})]}),o(l,{ml:"auto",children:r?d(l,{align:"center",children:[o(p,{fontSize:"sm",color:"destructive",mr:1,children:"Failed"}),o(T,{color:"destructive"})]}):e?o(b,{}):m?d(l,{align:"center",children:[o(p,{fontSize:"sm",color:"mutedForeground",mr:1,children:"In progress"}),o(L,{color:"mutedForeground",size:"sm"})]}):o(g,{h:4,w:4,borderRadius:"50%",color:"mutedForeground",border:"2px solid"})})]}),u=S;import{Flex as z,Text as R}from"@chakra-ui/react";import{jsx as x,jsxs as C}from"react/jsx-runtime";var v=({list:r})=>C(z,{flexDir:"column",children:[x(R,{fontSize:"lg",children:"Processing"}),r==null?void 0:r.map((e,m)=>x(u,{inProgress:(e==null?void 0:e.completed)==="pending",failed:(e==null?void 0:e.completed)==="error",completed:(e==null?void 0:e.completed)==="completed",title:e==null?void 0:e.title,isLast:(r==null?void 0:r.length)===m+1,hasLink:e==null?void 0:e.hasLink,link:e==null?void 0:e.link},m))]}),A=v;export{A as default};
