import{u as e,b0 as a,l as s,x as t,dM as o,A as r,a7 as n,c7 as i,_ as m}from"./utils-lib.js?v=20260328163632";import{k as l,r as c,a9 as p,o as u,Y as d,V as v,W as h,X as _,Z as x,a1 as g}from"./base-lib.js?v=20260328163632";const f={class:"icon-end-time voucher-logo"},b={class:"ml-[4px] font-bold text-[var(--text-color-37)]"},y=m(l({__name:"index",setup(m){const l=c([]),{payment:y}=e(),{voucherOpenTime:D,isGetCoupon:T}=p(y.value),w=async()=>{t({request:o(),data:[Array,l]})},C=()=>{r({area:400,component:()=>n((()=>import("./store5.js?v=20260328163632").then((e=>e.i))),[],import.meta.url),customClass:"voucherFetchView",compData:{isCoupon:l.value,isHome:!0}})};return u((()=>{const e=Number(sessionStorage.getItem("voucherOpenTime"));if(-100!==e){if(e){e-Math.floor(Date.now()/1e3)<=0&&(T.value=!0,sessionStorage.removeItem("voucherOpenTime"),(async()=>{let e=new Date((new Date).toLocaleDateString()).getTime()+6048e5-1;e=Math.floor(e>0?e/1e3:e),t({request:i({limit_time:e})}),T.value=!0})())}a({promises:[w],delay:3e3})}})),(e,a)=>d(l).length>0&&!d(T)?(v(),h("div",{key:0,class:"flex items-center px-[1rem] py-[.4rem] mr-[8px] rounded-[2px] recom-bg",onClick:C},[_("span",f,[_("span",b,x(d(s)("您有{0}个优惠券待领取",[d(l).length])),1)])])):g("",!0)}}),[["__scopeId","data-v-23dcda27"]]);export{y as B};
