import{h,F as Fragment}from"./index-15028158.js";var executionIconByStatus=function(e,t){if(t==="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(t){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"}}}};var CodeExecuteStatus=function(e){var t;if(e.nodeKind==="Parameter"){return h("stencila-icon",{icon:"asterisk",iconStyle:null,color:"neutral-500, #6e7591",class:"executeStatus"})}if(!e.executeRequired||!e.executeStatus){return h(Fragment,null)}var r=executionIconByStatus(e.executeStatus,e.executeRequired);return h("stencila-tooltip",{text:r.title,slot:e.slot,position:"right-end"},h("stencila-icon",{icon:r.icon,color:r.color,class:"executeStatus executeRequired-"+e.executeRequired+" "+((t=e.executeStatus)===null||t===void 0?void 0:t.toLowerCase())}))};export{CodeExecuteStatus as C};
//# sourceMappingURL=codeExecuteStatus-4edc3b03.js.map