import{a4 as e,r as t}from"./vendor-jA_NIjzi.js";import{q as a,F as i,U as o,a4 as r}from"./common-utils-8H8K2JPG.js";import{aV as n}from"./common-store-e_1WBubm.js";function s(){const s=e(),c=t(!1),d=t(!1),f=e=>{switch(e){case 0:return a()?(i("toActivity"),""):"/activity";case 1:return a()?void i("secondRecharge"):void(d.value=!0);case 2:return"/mine/withdrawMoney";case 3:return"/twoActivity?messageBack=1";case 4:return"/fundDetails";case 5:return a()?void i("secondBetRecords"):void(c.value=!0);case 6:return"/welfareCenter";case 7:return"/affiliate?tab=0&from=/entertainment";case 8:return"/customerService"}},m=e=>{n({id:e.secondConfigId}).then((t=>{let a=t.data;a&&a.data?0===a.config?o(a.data):window.location.href=a.data:s.push({path:"ActivityDetails",query:{id:e.secondConfigId,activityConditionType:e.activityCategory||""}})})).catch((()=>{s.push({path:"ActivityDetails",query:{id:e.secondConfigId,activityConditionType:e.activityCategory||""}})}))},h=async e=>{if(0===e.gameLobby)s.push({path:"/thirdgamelist/".concat(e.thirdGameName,"/").concat(e.secondConfig),query:{from:"/entertainment"}});else try{let t={thirdGameCode:e.secondConfig,gameCode:e.secondConfigId,gameLobby:e.gameLobby,h5RedirectParam:e.h5RedirectParam,isMaintain:e.isMaintain||0};r(t,{gameCode:t.h5RedirectParam})}catch(t){}};return{entryClick:e=>{switch(e.linkType){case 1:a()?i("openWindow",{...e}):0===e.firstConfigId?o(e.firstConfig):window.location.href=e.firstConfig;break;case 2:{let t=f(1*e.firstConfigId);t&&s.push(t);break}case 3:if(1===e.secondConfigId)return;m(e);break;case 4:h(e);break;case 5:break;default:s.push(f(1*e.firstConfigId))}},showRight:c,showRechargeRight:d}}export{s as u};
