import{k as e,M as a,bW as s,R as t,bU as n,z as o}from"./index-018fb6dd.js";function u(u="delete",r="确认删除吗"){const c=e(!1),d=e();return{destroy:function(e,o){a.confirm(r+"?",(function(){s(d.value)&&d.value(),t[u](e+"/"+o).then((e=>{e.data.code===n.SUCCESS?(a.success(e.data.message),c.value=!0):a.error(e.data.message)})).finally((()=>{}))}))},deleted:e=>{o(c,(function(a){a&&(c.value=!1,e())}))}}}export{u};
