import{F as n,G as o,H as i,J as c}from"./index-D7KLAbvI.js";import{aN as u}from"./@ui-core-DKdciH1Z.js";async function h({payload:a}){const e=i(c.stacks.all),t=await n(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!t.ok){const s=await t.json().then(r=>Array.isArray(r.detail)?r.detail[1]:r.detail).catch(()=>"Error while creating new stack");throw new o({status:t.status,statusText:t.statusText,message:s})}return t.json()}function m(a){return u({mutationKey:["stacks","create"],...a,mutationFn:async({payload:e})=>h({payload:e})})}export{m as u};
