import{d as t}from"./vendor-CB_mu4eO.js";import{i as s,p as a,R as e,E as n,P as o}from"./souav-BTAG2baT.js";import{u as r}from"./vendor-bo_0oRCG.js";import{r as i}from"./vendor-BXdGExd0.js";class c{static taskList(t=null){return s(a.taskList,t)}}const l=t("taskCenter",()=>{const t=r(),s=i([]),a=i(e.loading),l={"sign-in":"task_sign","watch-video":"task_watch","watch-adv":"task_ad",comment:"task_comment",share:"task_share",collect:"task_collect"};async function u(){try{a.value=e.loading;const t=await c.taskList(),{code:o,data:r}=t;o===n.Success?(s.value=(null==r?void 0:r.taskList)||[],a.value=0===s.value.length?e.EmptyData:e.success):a.value=e.NetError}catch(t){a.value=e.NetError}}return{taskList:s,refreshStatus:a,reqTaskList:u,onNetErrorRefresh:function(){u()},onClickTask:function(s){"sign-in"===s.taskId?o.open("SignIn",{transition:"slide-fade"}):"share"===s.taskId?o.open("Promote",{transition:"slide-fade"}):(o.closeAll(),t.push("/"))},getIconName:function(t){return l[t]||""},reset:function(){s.value=[]}}});export{l as u};
