import{h as d,j as n,L as m}from"./vendor-tanstack-BpuysabX.js";import{cI as f,y as l,cJ as p,q as D}from"./index-CREafGO4.js";import{u as h}from"./use-delete-confirmation-dialog-BgQibraR.js";const C=()=>{const o=d(),[t,a]=h(),{deleteDeployment:r}=f();return[t,(s,{shouldNavigate:i=!1}={})=>a({title:"Delete Deployment",description:`Are you sure you want to delete ${s.name}? This action cannot be undone.`,onConfirm:()=>{r(s.id,{onSuccess:()=>{l.success("Deployment deleted"),i&&o({to:"/deployments"})},onError:c=>{const u=c.message||"Unknown error while deleting deployment.";console.error(u)}})}})]},g={state:{type:"SCHEDULED",message:"Run from the Prefect UI with defaults",state_details:{deferred:!1,untrackable_result:!1,pause_reschedule:!1}}},R=()=>{const{createDeploymentFlowRun:o,isPending:t}=p();return{onQuickRun:r=>{o({id:r,...g},{onSuccess:e=>{l.success("Flow run created",{action:n.jsx(m,{to:"/runs/flow-run/$id",params:{id:e.id},children:n.jsx(D,{size:"sm",children:"View run"})}),description:n.jsxs("p",{children:[n.jsx("span",{className:"font-bold",children:e.name})," scheduled to start"," ",n.jsx("span",{className:"font-bold",children:"now"})]})})},onError:e=>{const s=e.message||"Unknown error while creating flow run.";console.error(s)}})},isPending:t}};export{C as a,R as u};
//# sourceMappingURL=use-quick-run-D8uL0_lf.js.map
