import{F as o,G as i,H as u,J as p}from"./index-D7KLAbvI.js";import{aN as c}from"./@ui-core-DKdciH1Z.js";async function h({payload:e,snapshotId:a}){const s=u(p.pipeline_snapshots.detail(a)),t=await o(s,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.json().then(r=>Array.isArray(r.detail)?r.detail[1]:r.detail).catch(()=>`Failed to update snapshot ${a}`);throw new i({status:t.status,statusText:t.statusText,message:n})}return t.json()}function l(e){return c({...e,mutationFn:async({payload:a,snapshotId:s})=>h({payload:a,snapshotId:s})})}export{l as u};
