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