import{j as s,o as r,F as i,p as u}from"./index-D2iSHVZq.js";import{b as c}from"./@tanstack-CSxjHCME.js";async function h(a){const o=r(u.login),t=await s(o,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a)});if(!t.ok){const e=await t.json().then(n=>n.detail).catch(()=>["","Failed to login"]);throw new i({status:t.status,statusText:t.statusText,message:e[1]||"Failed to login"})}return t.json()}function m(a){return c({mutationFn:async o=>h(o),...a})}export{m as u};
