import{r as o,j as n}from"./@radix-B1sy0Lhr.js";import{c as i,F as c,G as u,H as d}from"./index-CO6UN3UX.js";import{c as m}from"./@tanstack-Dwlisomv.js";const l=o.forwardRef(({className:e,...r},t)=>n.jsx("label",{ref:t,...r,className:i("flex w-full items-center gap-2 space-x-2 rounded-md border border-theme-border-moderate p-4 font-semibold transition-shadow duration-150 hover:cursor-pointer hover:shadow-sm data-[state=selected]:border-theme-surface-strong",e)}));l.displayName="RadioItemLabel";const f=o.forwardRef(({className:e,type:r,...t},a)=>n.jsx("input",{type:"radio",ref:a,...t,className:i("h-3 w-3 border !border-theme-border-bold text-theme-surface-primary focus:ring-2 focus:ring-theme-surface-strong",e)}));f.displayName="RadioItem";function y(e){return new Promise(r=>setTimeout(r,e))}async function p({payload:e}){const r=c(d.stacks.all),t=await fetch(r,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const a=await t.json().then(s=>Array.isArray(s.detail)?s.detail[1]:s.detail).catch(()=>"Error while creating new stack");throw new u({status:t.status,statusText:t.statusText,message:a})}return t.json()}function x(e){return m({...e,mutationFn:async({payload:r})=>p({payload:r})})}export{l as R,f as a,y as s,x as u};
