"use strict";const t=require("../../../../../common/vendor.js"),e=require("../../index.js"),o=require("../../api/promotion/rewardActivity.js"),i=require("../../hooks/useGoods.js");if(!Array){t.resolveComponent("su-popup")()}Math;const a={__name:"s-activity-pop",props:{modelValue:{type:Object,default(){}},show:{type:Boolean,default:!1}},emits:["close"],setup(a,{emit:r}){const c=a,s=r,d=t.reactive({activityInfo:t.computed((()=>c.modelValue)),activityMap:{}});return t.watch((()=>c.show),(()=>{var t;c.show&&(null==(t=d.activityInfo)||t.forEach((t=>{o.RewardActivityApi.getRewardActivity(t.id).then((e=>{0===e.code&&(d.activityMap[t.id]=e.data)}))})))})),(o,r)=>({a:t.f(d.activityInfo,((o,a,r)=>{var c;return{a:t.f(null==(c=d.activityMap[o.id])?void 0:c.rules,((e,a,r)=>({a:t.t(t.unref(i.formatRewardActivityRule)(d.activityMap[o.id],e)),b:e}))),b:t.o((t=>{return i=o,void e.sheep.$router.go("/modules/mall/activity/index",{activityId:i.id});var i}),o.id),c:o.id}})),b:t.o((t=>s("close"))),c:t.p({show:a.show,type:"bottom",round:"20",showClose:!0})})}},r=t._export_sfc(a,[["__scopeId","data-v-c80b69ad"]]);wx.createComponent(r);