import{aX as G,O as $,aS as h,aT as r,bf as n,a$ as s,b9 as _,N as y,aY as l,bg as B,bh as F,ba as e,b0 as i,bi as M,b8 as A,aB as L}from"./index-xnhGKCfe.js";import{P as U}from"./index-97-mhYEo.js";import O from"./inde-Cyc8CAph.js";import{c as z}from"./currency-DTUBf2lI.js";import{f as E}from"./common-D-vNz206.js";import{u as J}from"./useRechargeGift-DxXOQNy7.js";import"./pre-D84pmYLY.js";import"./useProtocol-DJp7lFWi.js";const X={class:"recharge-gift"},Y=["onClick"],Z=["src"],j={key:0,class:"gift-btn"},q={class:"gift-expired-time"},H={class:"rechargeInfo"},K={class:"errTip"},Q={__name:"index",setup(W){const{getUserRechargeGiftPackListFun:R,packsList:v,lastTriggerRecord:u,isShowRechangeDialog:C,closeShowRechangeDialog:k,handRecharge:g,currPayType:d,categoryChange:b,toGetGiftPack:I,hasCustomerInfo:N,customerRecharge:T,localDialog:f,formData:c,localRechargeFormConfigs:S}=J(),V=async()=>{var t;if(N.includes((t=d.value)==null?void 0:t.rechargeType))return T();await g()},x=async t=>{const a={holderName:t.holderName,accountNo:t.accountNo};!a.holderName||!a.accountNo||(localStorage.setItem("customerInfo",JSON.stringify(a)),await g(a))};return $(async()=>{await R()}),(t,a)=>{const P=A,D=M;return r(),h(U,{class:"activity"},{default:n(()=>{var m,p;return[s("div",X,[(r(!0),l(B,null,F(e(v),(o,w)=>(r(),l("div",{key:w,class:"gift-item",onClick:ee=>e(I)(o,!0)},[s("img",{src:o==null?void 0:o.rechargeGiftPackImage,class:"popup-img"},null,8,Z),o.rechargeAmount?(r(),l("div",j,i(e(z)(o.rechargeAmount)),1)):_("",!0),s("div",q,"Vaild Time:"+i(e(E)(o==null?void 0:o.expiredTime)),1)],8,Y))),128))]),e(C)?(r(),h(O,{key:0,amount:(m=e(u))==null?void 0:m.popupInfo.rechargeAmount,currPayType:e(d),baseZIndex:1e3,currRechargeMethod:((p=e(u))==null?void 0:p.popupInfo.supportRechargeCategorys)||[],onSelectMethod:e(b),onGoodsRecharge:V,onClose:e(k)},null,8,["amount","currPayType","currRechargeMethod","onSelectMethod","onClose"])):_("",!0),y(D,{modelValue:e(f),title:t.$t("t203"),zIndex:1009,onClose:a[2]||(a[2]=o=>f.value=!1)},{default:n(()=>[s("div",H,[y(P,{ref:"formRef",modelValue:e(c),"onUpdate:modelValue":a[0]||(a[0]=o=>L(c)?c.value=o:null),configs:e(S),onSubmit:a[1]||(a[1]=o=>x(e(c)))},{formfooter:n(()=>[s("div",K,i(t.$t("t817")),1)]),_:1},8,["modelValue","configs"])])]),_:1},8,["modelValue","title"])]}),_:1})}}},ie=G(Q,[["__scopeId","data-v-32c1a18c"]]);export{ie as default};
