"use strict";const e=require("../../../common/vendor.js"),r=require("../../index.js"),t=require("../../api/product/spu.js"),i=require("../../api/promotion/combination.js");if(require("../../url/index.js"),require("../../store/index.js"),require("../../store/app.js"),require("../../api/promotion/diy.js"),require("../../request/index.js"),require("../../config/index.js"),require("../../platform/index.js"),require("../../platform/provider/wechat/index.js"),require("../../platform/provider/wechat/miniProgram.js"),require("../../api/member/auth.js"),require("../../api/member/social.js"),require("../../api/member/user.js"),require("../../platform/provider/apple/index.js"),require("../../platform/share.js"),require("../../router/index.js"),require("../../hooks/useModal.js"),require("../../helper/index.js"),require("../../helper/test.js"),require("../../helper/digit.js"),require("../../api/member/signin.js"),require("../../helper/throttle.js"),require("../../platform/pay.js"),require("../../api/pay/order.js"),require("../../store/user.js"),require("../../store/cart.js"),require("../../api/trade/cart.js"),require("../../api/pay/wallet.js"),require("../../api/trade/order.js"),require("../../api/promotion/coupon.js"),require("../../store/sys.js"),require("../../store/modal.js"),require("../../config/zIndex.js"),!Array){e.resolveComponent("s-goods-column")()}Math;const o={__name:"s-groupon-block",props:{data:{type:Object,default(){}},styles:{type:Object,default(){}}},setup(o){const a=o;let{layoutType:d,tagStyle:s,btnBuy:u,space:n}=a.data;a.styles;const p=e.computed((()=>{let e=a.data.btnBuy;return"text"===(null==e?void 0:e.type)?{background:`linear-gradient(to right, ${e.bgBeginColor}, ${e.bgEndColor})`}:"img"===(null==e?void 0:e.type)?{width:"54rpx",height:"54rpx",background:`url(${r.sheep.$url.cdn(e.imgUrl)}) no-repeat`,backgroundSize:"100% 100%"}:void 0})),l=e.ref([]);return e.onMounted((async()=>{const{data:e}=await i.CombinationApi.getCombinationActivity(a.data.activityId),{data:r}=await t.SpuApi.getSpuDetail(e.spuId);l.value=[r]})),(t,i)=>{var c;return e.e({a:"threeCol"===e.unref(d)},"threeCol"===e.unref(d)?{b:e.f(l.value,((t,i,d)=>{var u;return{a:e.o((i=>e.unref(r.sheep).$router.go("/pages/goods/groupon",{id:t.id,activity_id:a.data.activityId})),t.id),b:"2db995b9-0-"+d,c:e.p({size:"sm",goodsFields:o.data.fields,tagStyle:e.unref(s),data:t,titleColor:null==(u=o.data.fields.name)?void 0:u.color,topRadius:o.data.borderRadiusTop,bottomRadius:o.data.borderRadiusBottom}),d:t.id}})),c:e.s({padding:o.data.space+"rpx"}),d:e.s({margin:"-"+o.data.space+"rpx"})}:{},{e:"oneCol"===e.unref(d)},"oneCol"===e.unref(d)?{f:e.f(l.value,((t,i,d)=>{var u,n;return{a:e.o((i=>e.unref(r.sheep).$router.go("/pages/goods/groupon",{id:t.id,activity_id:a.data.activityId})),i),b:"2db995b9-1-"+d,c:e.p({size:"lg",goodsFields:o.data.fields,tagStyle:e.unref(s),data:t,titleColor:null==(u=o.data.fields.name)?void 0:u.color,subTitleColor:null==(n=o.data.fields.introduction)?void 0:n.color,topRadius:o.data.borderRadiusTop,bottomRadius:o.data.borderRadiusBottom}),d:i}})),g:e.t("text"===(null==(c=e.unref(u))?void 0:c.type)?e.unref(u).text:""),h:e.s(p.value),i:e.s({marginBottom:e.unref(n)+"px"})}:{})}}},a=e._export_sfc(o,[["__scopeId","data-v-2db995b9"]]);wx.createComponent(a);
