import{u as n}from"./useHandleData-64cc6aad-1782572373740v=1.0.0.js";import{s as E,o as B,p as A,q as D}from"./eventListApi-0bc79350-1782572373740v=1.0.0.js";import{u as p,a as F}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{g as C,E as r}from"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import{r as S,h as L}from"./vendor-866bb149-1782572373740v=1.0.0.js";const U=o=>{const t=o,u=S(!1),i=p(),l=F(),d=()=>{i.push({name:"eventListEdit",query:{id:t.value.eventId}})},c=async()=>{let e="\u63D0\u4EA4\u5F53\u524D\u8D5B\u4E8B\u6D3B\u52A8";u.value=!1,await n(E,t.value.eventId,e),u.value=!0},v=()=>{C.prompt("\u662F\u5426\u5F3A\u5236\u64A4\u9500\u5BA1\u6838","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",cancelButtonText:"\u53D6\u6D88",inputPlaceholder:"\u8BF7\u8F93\u5165\u539F\u56E0"}).then(({value:e})=>{u.value=!1,B({id:l.query.id,auditFailureCause:e}).then(a=>{a.code===0?(r({type:"success",message:"\u64A4\u9500\u6210\u529F"}),u.value=!0):r.error(a.msg)}).catch(a=>{r.error(a.msg)})}).catch(()=>{}).finally(()=>{})},m=async()=>{let e="\u53D1\u5E03\u5F53\u524D\u8D5B\u4E8B\u6D3B\u52A8";u.value=!1,await n(A,t.value.eventId,e),u.value=!0},h=async()=>{let e="\u4E0B\u67B6\u5F53\u524D\u8D5B\u4E8B\u6D3B\u52A8";u.value=!1,await n(D,t.value.eventId,e),u.value=!0},f=()=>{i.push({name:"selfSignupAddSignup",query:{id:t.value.eventId,jumpFrom:"selfSignup"}})};let s={config:"",manage:"",copy:"",confirm:"isCurrentLoginUserAuditAuth",reject:"isCurrentLoginUserAuditAuth",edit:"isCurrentLoginUserEdit",submit:"isCurrentLoginUserSubmit",del:"isCurrentLoginUserDel",reason:["failed"],cancelAudit:"isCurrentLoginUserRevocation",downEvent:"isCurrentLoginUserSoldOut",publish:"isCurrentLoginUserPublish"};const g=e=>s[e]==""?!0:Array.isArray(s[e])?s[e].length===0||s[e].includes(t.value.auditStatus):s[e]&&t.value[s[e]]==1;return L(t,(e,a)=>{e!==a&&e.auditStatus}),{handleEdit:d,handleSubmit:c,handleCancelAudit:v,handlePublish:m,handleDownEvent:h,showButtonFn:g,handleSignup:f,isRefresh:u}},x=U;export{x as u};
