import{r as l,a as n}from"./app-BwDemWQz.js";import{s as c}from"./index-CkDmAPFS.js";const p=(o,s)=>{const[a,e]=l.useState(!1);return{handleDelete:async t=>{e(!0);try{await n.post(c(o),{id:t},{preserveScroll:!0,onSuccess:()=>{s(t),e(!1)},onError:r=>{console.error("Deletion failed:",r),e(!1)}})}catch(r){console.error("An unexpected error occurred:",r),e(!1)}},isDeleting:a}};export{p as u};
