import{h as e,F as r}from"./p-5da71329.js";const n=(e,r)=>{if(r==="No"){switch(e){case"Scheduled":{return{icon:"timer-2",color:"neutral-500, #6e7591",title:"Scheduled"}}case"ScheduledPreviouslyFailed":{return{icon:"timer-2",color:"danger-500, #cf445e",title:"Scheduled (previously failed)"}}case"Running":{return{icon:"loader-2",color:"neutral-500, #6e7591",title:"Running"}}case"RunningPreviouslyFailed":{return{icon:"loader-2",color:"danger-500, #cf445e",title:"Running (previously failed)"}}case"Succeeded":{return{icon:"checkbox-circle",color:"success-500, #3c8455",title:"Succeeded"}}case"Failed":{return{icon:"close-circle",color:"danger-500, #cf445e",title:"Failed"}}case"Cancelled":{return{icon:"forbid",color:"warn-600, #ba8925",title:"Cancelled"}}default:{return{icon:"refresh",color:"neutral-500, #6e7591",title:"Run node"}}}}switch(r){case"NeverExecuted":{return{icon:"indeterminate-circle",color:"neutral-500, #6e7591",title:"Not run yet"}}case"DependenciesFailed":{return{icon:"refresh",color:"danger-500, #cf445e",title:"Dependencies failed, re-run to update value"}}case"DependenciesChanged":{return{icon:"refresh",color:"warn-600, #ba8925",title:"Dependencies changed, re-run to update value"}}case"SemanticsChanged":{return{icon:"refresh",color:"warn-600, #ba8925",title:"Semantics changed, re-run to update value"}}}};const c=c=>{var t;if(c.nodeKind==="Parameter"){return e("stencila-icon",{icon:"asterisk",iconStyle:null,color:"neutral-500, #6e7591",class:"executeStatus"})}if(!c.executeRequired||!c.executeStatus){return e(r,null)}const i=n(c.executeStatus,c.executeRequired);return e("stencila-tooltip",{text:i.title,slot:c.slot,position:"right-end"},e("stencila-icon",{icon:i.icon,color:i.color,class:`executeStatus executeRequired-${c.executeRequired} ${(t=c.executeStatus)===null||t===void 0?void 0:t.toLowerCase()}`}))};export{c as C};
//# sourceMappingURL=p-bffdcb1f.js.map