import{U as H,r as i,K as V,aH as W,$ as Z,aI as K,E as P,V as h,ai as X,m as r,Z as L,an as p,am as T,p as t,W as G,X as I,o as n,Y as _,ah as y,aj as S,at as Y,M as k,ad as q}from"./common.modules-7ef9f935.js";import{d as Q,A as ee,aw as ae,_ as se}from"./page-activity-ActivityDetail-6651511c.js";import{F as te,a as ne}from"./page-home-AllGames-2e11b3d4.js";import"./native/index-1870b44d.js";import"./en-fc63d25a.js";window.getBuildInfo=function(){return{buildTime:"3/28/2025, 7:06:51 PM",branch:"origin/masterBranch/main commitId:afb5d46f657248d3137decf21a49f44fbff20383"}};const le={class:"onlineGames__container"},oe=["placeholder"],ie={class:"onlineGames__container-list"},ue=["onClick"],ce={key:1},re={class:"onlineGames__container-list miniGames"},me=["onClick"],ve=H({__name:"index",setup(O){const{onItemClick:C}=Q(),N=i(),m=i(0),f=i([]),v=i(0);V(m,e=>{const s=l.value[e];b.value=[],v.value=0,w(s.slotsTypeID)});const u=i(!1);V(u,e=>{e?setTimeout(()=>{x.value.focus()},0):g.value=""});const g=i("");W(g,e=>{if(d.value)if(d.value.key==="fish"||d.value.key==="flash")l.value=l.value.filter(s=>s.gameNameEn.toLowerCase().includes(e)),e.length===0&&(l.value=sessionStorage.getItem("slotGamesList")?JSON.parse(sessionStorage.getItem("slotGamesList")):null);else{const s=l.value[m.value];w(s.slotsTypeID,e)}},{debounce:300});const x=i(null),d=i(),l=i([]),b=i([]),R=Z(),F=K(b,e=>u.value?e.gameNameEn.toLowerCase().includes(g.value.toLowerCase()):e.customGameType===v.value);function J(e){return e?e.split(/(?=[A-Z])/).join(" "):""}function M(){R.go(-1)}function B(e){u.value=e}async function w(e,s=""){const c=await ee(ae({type:e,gameNameEn:s}));if(c){if(b.value=c.data.gameLists||[],f.value=c.data.gameCustomTypeLists||[],!f.value.length)return;v.value=f.value[0].customGameType}}return P(()=>{d.value=sessionStorage.getItem("gameType")?JSON.parse(sessionStorage.getItem("gameType")):null,l.value=sessionStorage.getItem("slotGamesList")?JSON.parse(sessionStorage.getItem("slotGamesList")):null;const e=JSON.parse(sessionStorage.getItem("clickedItem"));e&&(m.value=l.value.findIndex(c=>c.slotsTypeID===e.slotsTypeID)),N.value&&N.value.scrollTo(m.value);const s=l.value[m.value];w(s.slotsTypeID)}),(e,s)=>{var E,A;const c=h("svg-icon"),U=h("NavBar"),j=h("van-tab"),z=h("van-tabs"),D=X("lazy");return n(),r("div",le,[L(U,{class:"white","left-arrow":"",onClickLeft:M},{center:p(()=>{var a;return[t("span",{class:y({active:u.value})},_((a=d.value)==null?void 0:a.title)+_(e.$t("game")),3),S(t("input",{type:"text",placeholder:e.$t("searchGame"),class:y({active:u.value}),"onUpdate:modelValue":s[0]||(s[0]=o=>g.value=o),ref_key:"searchBarRef",ref:x},null,10,oe),[[Y,g.value]])]}),right:p(()=>[L(c,{name:"SearchTrx",onClick:s[1]||(s[1]=a=>B(!0)),class:y({active:u.value})},null,8,["class"]),t("span",{class:y({active:u.value}),onClick:s[2]||(s[2]=a=>B(!1))},_(e.$t("cancel")),3)]),_:1}),((E=d.value)==null?void 0:E.key)!=="fish"&&((A=d.value)==null?void 0:A.key)!=="flash"?(n(),T(z,{key:0,class:"onlineGames__container-tabBar",active:m.value,"onUpdate:active":s[4]||(s[4]=a=>m.value=a),type:"card",sticky:!0,"offset-top":46,ref_key:"tabsRef",ref:N},{default:p(()=>[(n(!0),r(G,null,I(l.value,(a,o)=>(n(),T(j,{key:o},{title:p(()=>[L(c,{name:a.slotsName,class:"gameIcon"},null,8,["name"]),t("span",null,_(a.slotsName.replace("G9","9G")),1)]),_:2},1024))),128)),!u.value||f.value.length===0?(n(),T(k(te),{key:0,modelValue:v.value,"onUpdate:modelValue":s[3]||(s[3]=a=>v.value=a),lineWidth:0},{default:p(()=>[(n(!0),r(G,null,I(f.value,(a,o)=>(n(),T(k(ne),{name:o,key:o,class:y([{activeClassName:v.value===a.customGameType}]),onClick:$=>v.value=a.customGameType},{default:p(()=>[t("span",null,_(a.customGameTypeName),1)]),_:2},1032,["name","class","onClick"]))),128))]),_:1},8,["modelValue"])):q("v-if",!0),t("div",ie,[(n(!0),r(G,null,I(k(F),(a,o)=>(n(),r("div",{class:"onlineGames__container-list__item",key:o,onClick:$=>k(C)(a)},[S(t("img",null,null,512),[[D,a.img]]),t("div",null,[t("span",null,_(J(a.gameNameEn)),1)])],8,ue))),128))])]),_:1},8,["active"])):(n(),r("div",ce,[t("div",re,[(n(!0),r(G,null,I(l.value,(a,o)=>(n(),r("div",{class:"onlineGames__container-list__item",key:o,onClick:$=>k(C)(a)},[S(t("img",null,null,512),[[D,a.img]]),t("div",null,[t("span",null,_(a.gameNameEn),1)])],8,me))),128))])]))])}}});const ye=se(ve,[["__scopeId","data-v-0ffc3892"],["__file","/var/lib/jenkins/workspace/web-印度-ar050-daman-01/src/views/home/AllOnlineGames/index.vue"]]);export{ye as default};
//# sourceMappingURL=page-home-AllOnlineGames-dd457d91.js.map
