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