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