import{bg as g,bd as l,u as x,w as b,j as e,d as t,hP as j,an as i,T as r,f9 as f,ht as R,q as P}from"./index-CK33qGU_.js";import{b as w}from"./index-Cwe0XbXT.js";import{B as J}from"./ButtonWithRole-NHXEosto.js";import{J as y}from"./JobsExecutionsPopup-BCMHDb4N.js";const F=({jobData:n})=>{const a=g(),p=l(),{id:s}=x(),[u,{isLoading:m}]=w(),[d,o]=b(),h=()=>{u({pId:s,name:n.name,data:n.config.defaultArgs}).unwrap().then(()=>{p.info({title:"Info",content:"Job started"}),a(P.jobs.executions,{jobName:n.name})})};return e.jsxs(e.Fragment,{children:[e.jsx(y,{projectId:+s,item:n,isOpenPopup:d,handleTogglePopup:o}),e.jsx(t,{children:e.jsxs(j,{size:"sm",variant:"outline",spacing:"0.5",height:"30px",mt:"1px",children:[e.jsx(J,{intent:"primary",isLoading:m,onClick:h,sx:{pr:"10px"},height:"30px",children:e.jsxs(t,{children:[e.jsx(i,{icon:r.play,color:"white",size:"sm",mr:"2px"}),"Run"]})}),e.jsx(f,{sx:{mt:"0px",height:"100%",span:{height:"100%"},":hover":{">button":{div:{bg:"primaryShade1"}}}},items:[{disabled:n.jobType===R.FLINK,value:"Run with different arguments",onClick:o}],renderButton:({isOpen:c})=>e.jsx(i,{icon:r.arrow_down,color:"white",height:"100%",alignItems:"center",sx:{bg:c?"primaryShade1":"primary"}})})]})})]})};export{F as R};
