1import{U as I,a as T,W as V,w as j,x as D,p as E,ab as n,ac as r,av as d,af as x,aE as k,aB as H,aw as z,B as t,az as w,aA as b,aD as R,ah as U,M as F,r as p,n as W,e as q,aL as G,N as J}from"./vendor-nuxt-8f7c6603-179092878.js";import{_ as K}from"./PromotionModal-99165164-179092878.js";import{T as O,a as Q,n as X,o as Y}from"./entry-f63cb443-179092878.js";import"./vendor-swiper-0072353e-179092878.js";const Z={class:"flex justify-between"},oo={class:"promotion-title text-lg font-bold"},ao={class:"max-h-[800px] overflow-y-auto border-red-50 pr-px"},eo={key:0,class:"mx-auto mt-4 grid max-w-[360px] gap-4 sm:max-w-none sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-2"},to={class:"skeleton promotion-entry-height rounded"},so={key:1},no={key:0,class:"mx-auto mt-4 grid max-w-[360px] gap-4 sm:max-w-none sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-2"},ro=["onClick"],go={__name:"PromotionList",setup(io){const P=F(),o=O(),s=Q(),g=X(),_=I(),{localeCurrency:m}=Y();T(()=>{o.getList(s.data&&s.data.currency?s.data.currency:m.value)});const{locale:C}=V();j(()=>C.value,()=>{o.getList(s.data&&s.data.currency?s.data.currency:m.value,!0)});const h=p(null),L=e=>{h.value=e,W(()=>{i.value=!0})},i=p(!1),c=p(!1),{$api:$,$toast:f}=J(),M=async e=>{var u;if(c.value)return;c.value=!0;const a=await $("promotion/apply-promotion",{promotion_id:e.id});if(c.value=!1,!a.status){((u=a.data)==null?void 0:u.claim_restriction)==1?(g.appClaimMessage=a.msg,g.appClaimModal=!0):f(!1,a.msg);return}f(!0,a.msg),i.value=!1,o.loaded=!1,o.getList(s.data&&s.data.currency?s.data.currency:m.value)},N=D("triggerLogin"),S=()=>{i.value=!1,N()},B=q(()=>{var e;return(e=o==null?void 0:o.data)!=null&&e.promotion?o.data.promotion.filter(a=>a.eligible_status=="in-progress"&&!["journey-mission","cashback"].includes(a.promotion_type)).length:0});return E("hasInProgressPromo",B),(e,a)=>{var y,v;const u=G,A=K;return n(),r("div",null,[d("div",Z,[d("div",oo,x(e.$t("promotions")),1),k(u,{class:"btn_promotion",to:["mr8","powerlah","ew8","pokiesroad","fastpokies","uf9","bk9","rich996asia","rich255","luckystar","rich126"].includes(t(P).public.MERCHANT)?t(_)("/promo-center"):t(_)("/promotions"),"aria-label":e.$t("show_all")},{default:H(()=>[z(x(e.$t("show_all")),1)]),_:1},8,["to","aria-label"])]),d("div",ao,[t(o).loaded?(n(),r("div",so,[(v=(y=t(o))==null?void 0:y.data)!=null&&v.promotion&&t(o).data.promotion.length>0?(n(),r("div",no,[(n(!0),r(w,null,b(t(o).data.promotion,l=>(n(),r("div",{key:l.id,class:"promotion-entry-height cursor-pointer bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${l.small_image_path}?v=100)`}),onClick:lo=>L(l)},null,12,ro))),128))])):U("",!0)])):(n(),r("div",eo,[(n(),r(w,null,b(8,l=>d("div",to)),64))]))]),k(A,{show:t(i),onClose:a[0]||(a[0]=l=>i.value=!1),data:t(h),onApply:M,applying:t(c),onLogin:S},null,8,["show","data","applying"])])}}};export{go as default}; 2//# sourceMappingURL=PromotionList-b69e1f4c-179092878.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.