import{C as m}from"./router.9521f915.js";import{f as y,eG as C,f6 as v,d as O,b as i,c,u as a,ex as I}from"./outputWidgets.f0391a74.js";import{C as w}from"./CheckCircleFilled.a879feee.js";import{L as j}from"./LoadingOutlined.a23a3fd9.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1d803992-326b-4930-9ac7-f8cfcabd3cbb",r._sentryDebugIdIdentifier="sentry-dbid-1d803992-326b-4930-9ac7-f8cfcabd3cbb")}catch{}})();var S={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm192 472c0 4.4-3.6 8-8 8H328c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h368c4.4 0 8 3.6 8 8v48z"}}]},name:"minus-circle",theme:"filled"};const _=S;function b(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),n.forEach(function(s){A(r,s,e[s])})}return r}function A(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var l=function(t,e){var n=b({},t,e.attrs);return y(C,b({},n,{icon:v}),null)};l.displayName="CloseCircleFilled";l.inheritAttrs=!1;const F=l;function h(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),n.forEach(function(s){P(r,s,e[s])})}return r}function P(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var u=function(t,e){var n=h({},t,e.attrs);return y(C,h({},n,{icon:_}),null)};u.displayName="MinusCircleFilled";u.inheritAttrs=!1;const D=u;class k{async list({projectId:t,...e}){var g,p;const n={...e,offset:(g=e.offset)==null?void 0:g.toString(),limit:(p=e.limit)==null?void 0:p.toString()};Object.keys(n).forEach(o=>n[o]===void 0&&delete n[o]);const s=await m.get(`projects/${t}/executions`,n);return{executions:s.executions.map(o=>f.from(o)),totalCount:s.totalCount}}async fetchLogs(t,e){const n=await m.get(`projects/${t}/executions/${e}/logs`);return d.from(n)}}class d{constructor(t){this.dto=t}static from(t){return new d(t)}get entries(){return this.dto.sort((t,e)=>t.sequence-e.sequence).filter(t=>t.event!=="form-message")}}class f{constructor(t){this.dto=t}static from(t){return new f(t)}get id(){return this.dto.id}get shortId(){return this.dto.id.slice(0,8)}get createdAt(){return new Date(this.dto.createdAt)}get updatedAt(){return new Date(this.dto.updatedAt)}get status(){return this.dto.status}get context(){return this.dto.context}get buildId(){return this.dto.buildId}get stageId(){return this.dto.stageId}get duration_seconds(){return(this.updatedAt.getTime()-this.createdAt.getTime())/1e3}get stageRunId(){return this.dto.stageRunId}get projectId(){return this.dto.projectId}}const N=O({__name:"ExecutionStatusIcon",props:{status:{}},setup(r){return(t,e)=>t.status==="finished"?(i(),c(a(w),{key:0,style:{color:"#33b891"}})):t.status==="failed"?(i(),c(a(F),{key:1,style:{color:"#fa675c"}})):t.status==="abandoned"||t.status==="lock-failed"?(i(),c(a(D),{key:2,style:{color:"#f69220"}})):t.status==="running"?(i(),c(a(j),{key:3})):I("",!0)}});export{k as E,N as _};
//# sourceMappingURL=ExecutionStatusIcon.vue_vue_type_script_setup_true_lang.6857373d.js.map
