import{B as I}from"./BaseLayout.8e0836b5.js";import{S as N,L as R,b as j,c as z,E as M,a as U}from"./SmartChat.2a6d4f2a.js";import{S as V}from"./SaveButton.2ebbd765.js";import{b as s,ee as _,d as L,eo as G,ea as H,e as g,X,ah as q,o as m,c as b,w as r,u as n,S as f,$ as h,d9 as P,aG as k,e9 as B,dh as J,p as K,bT as Q,cO as W}from"./index.b466b20d.js";import{N as Y}from"./NavbarControls.471256b2.js";import{T as Z}from"./TasksManager.cc373af7.js";import{b as x}from"./index.f78751e0.js";import{T as O,A as y}from"./TabPane.83921cd6.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[a]="eeaaafec-7677-4483-a24c-3e7bed69c90f",o._sentryDebugIdIdentifier="sentry-dbid-eeaaafec-7677-4483-a24c-3e7bed69c90f")}catch{}})();var ee={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 64zm144.1 454.9L437.7 677.8a8.02 8.02 0 01-12.7-6.5V353.7a8 8 0 0112.7-6.5L656.1 506a7.9 7.9 0 010 12.9z"}}]},name:"play-circle",theme:"filled"};const te=ee;function F(o){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?Object(arguments[a]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable}))),i.forEach(function(l){ae(o,l,t[l])})}return o}function ae(o,a,t){return a in o?Object.defineProperty(o,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[a]=t,o}var C=function(a,t){var i=F({},a,t.attrs);return s(_,F({},i,{icon:te}),null)};C.displayName="PlayCircleFilled";C.inheritAttrs=!1;const se=C,pe=L({__name:"Editor",props:{workspace:{},stage:{},stageType:{}},emits:["refetch-tasks"],setup(o,{emit:a}){const t=o,i=G(),l=H();function $(){i.push({name:"stages"})}const w=g(null),A=g(null),D=e=>{t.stage.file=e},c=g("source-code"),u=g("test");function E(){var d;const e=t.stage.codeContent;(d=w.value)==null||d.updateLocalEditorCode(e)}const v=R.create(),S=new N(e=>v.log(e),l.params.id);X(()=>{S.connect()}),q(()=>{S.close()});const T=e=>e!==c.value&&t.stage.hasChanges();return(e,d)=>(m(),b(I,null,{navbar:r(()=>[s(n(x),{title:e.stage.title,style:{padding:"5px 25px",border:"1px solid #f6f6f6"},onBack:$},{extra:r(()=>[s(Y,{"editing-model":e.stage},null,8,["editing-model"])]),_:1},8,["title"])]),content:r(()=>[s(M,null,{left:r(()=>[s(n(O),{"active-key":c.value,"onUpdate:activeKey":d[0]||(d[0]=p=>c.value=p)},{rightExtra:r(()=>[s(V,{model:e.stage,onSave:E},null,8,["model"])]),default:r(()=>[s(n(y),{key:"source-code",tab:"Source code",disabled:T("source-code")},null,8,["disabled"]),s(n(y),{key:"settings",tab:"Settings",disabled:T("settings")},null,8,["disabled"])]),_:1},8,["active-key"]),c.value==="source-code"?(m(),b(j,{key:0,ref_key:"code",ref:w,script:e.stage,workspace:e.workspace,onUpdateFile:D},null,8,["script","workspace"])):f("",!0),e.stage&&c.value==="settings"?h(e.$slots,"settings",{key:1}):f("",!0)]),center:r(()=>[s(n(O),{"active-key":u.value,"onUpdate:activeKey":d[1]||(d[1]=p=>u.value=p)},{default:r(()=>[s(n(y),{key:"test",tab:"Test"}),s(n(y),{key:"tasks",tab:"Tasks"})]),_:1},8,["active-key"]),e.stage&&u.value==="tasks"?(m(),b(Z,{key:0,ref:"tasksManager","stage-id":e.stage.id,onRefetchTasks:d[2]||(d[2]=p=>a("refetch-tasks"))},null,8,["stage-id"])):f("",!0),e.stage&&u.value==="test"?h(e.$slots,"test",{key:1}):f("",!0)]),right:r(()=>[s(z,{"stage-type":e.stageType,workspace:e.workspace,stage:e.stage,"log-service":n(v)},null,8,["stage-type","workspace","stage","log-service"])]),_:3})]),footer:r(()=>[s(U,{ref_key:"smartConsole",ref:A,"stage-type":e.stageType,stage:e.stage,"log-service":n(v),workspace:e.workspace},null,8,["stage-type","stage","log-service","workspace"])]),_:3}))}}),ge=L({__name:"RunButton",props:{loading:{type:Boolean},disabled:{}},emits:["click","save"],setup(o,{emit:a}){return(t,i)=>(m(),b(n(W),{open:t.disabled?void 0:!1,placement:"bottom"},{content:r(()=>[s(n(J),{vertical:"",gap:"small"},{default:r(()=>[s(n(P),{style:{"font-size":"16px"}},{default:r(()=>{var l;return[k(B((l=t.disabled)==null?void 0:l.title),1)]}),_:1}),s(n(P),null,{default:r(()=>{var l;return[k(B((l=t.disabled)==null?void 0:l.message),1)]}),_:1})]),_:1})]),default:r(()=>[s(n(Q),{style:{width:"100%"},loading:t.loading,icon:K(n(se)),disabled:!!t.disabled,size:"large",type:"primary",onClick:i[0]||(i[0]=l=>a("click"))},{default:r(()=>[k(" Run ")]),_:1},8,["loading","icon","disabled"])]),_:1},8,["open"]))}});export{ge as _,pe as a};
//# sourceMappingURL=RunButton.vue_vue_type_script_setup_true_lang.3b2b7753.js.map
