import{d as B,r,w,b as I,o as l,A as C,B as G,C as n,aG as s,a,c as p,F as j,R as z,f as b,D as f,ac as L,G as R,b1 as P,__tla as U}from"./index-92ad187a.js";import{E as A,__tla as D}from"./el-image-ee9e09ec.js";import{__tla as E}from"./el-image-viewer-d472c5a2.js";import{g as F,__tla as S}from"./spu-64ca9320.js";import{g as W,__tla as q}from"./seckillActivity-603b539c.js";let g,H=Promise.all([(()=>{try{return U}catch{}})(),(()=>{try{return D}catch{}})(),(()=>{try{return E}catch{}})(),(()=>{try{return S}catch{}})(),(()=>{try{return q}catch{}})()]).then(async()=>{let _;_={key:0,class:"absolute left-0 top-0 z-1 items-center justify-center"},g=B({name:"PromotionSeckill",__name:"index",props:{property:{}},setup($){const o=$,i=r([]);w(()=>o.property.activityId,async()=>{if(!o.property.activityId)return;const t=await W(o.property.activityId);t!=null&&t.spuId&&(i.value=[await F(t.spuId)])},{immediate:!0,deep:!0});const c=r(375),m=r(),e=r(2),v=r("100%"),d=r("0"),x=r("");return w(()=>[o.property,c,i.value.length],()=>{e.value=o.property.layoutType==="oneCol"?1:3;const t=(c.value-o.property.space*(e.value-1))/e.value;d.value=e.value===2?"64px":`${t}px`,x.value=`repeat(${e.value}, auto)`,v.value="100%"},{immediate:!0,deep:!0}),I(()=>{var t,u;c.value=((u=(t=m.value)==null?void 0:t.wrapRef)==null?void 0:u.offsetWidth)||375}),(t,u)=>{const h=A,k=P;return l(),C(k,{class:"z-1 min-h-30px","wrap-class":"w-full",ref_key:"containerRef",ref:m},{default:G(()=>[n("div",{class:"grid overflow-x-auto",style:s({gridGap:`${t.property.space}px`,gridTemplateColumns:a(x),width:a(v)})},[(l(!0),p(j,null,z(a(i),(y,T)=>(l(),p("div",{class:"relative box-content flex flex-row flex-wrap overflow-hidden bg-white",style:s({borderTopLeftRadius:`${t.property.borderRadiusTop}px`,borderTopRightRadius:`${t.property.borderRadiusTop}px`,borderBottomLeftRadius:`${t.property.borderRadiusBottom}px`,borderBottomRightRadius:`${t.property.borderRadiusBottom}px`}),key:T},[t.property.badge.show?(l(),p("div",_,[b(h,{fit:"cover",src:t.property.badge.imgUrl,class:"h-26px w-38px"},null,8,["src"])])):f("",!0),b(h,{fit:"cover",src:y.picUrl,style:s({width:a(d),height:a(d)})},null,8,["src","style"]),n("div",{class:L(["flex flex-col gap-8px p-8px box-border",{"w-[calc(100%-64px)]":a(e)===2,"w-full":a(e)===3}])},[t.property.fields.name.show?(l(),p("div",{key:0,class:"truncate text-12px",style:s({color:t.property.fields.name.color})},R(y.name),5)):f("",!0),n("div",null,[t.property.fields.price.show?(l(),p("span",{key:0,class:"text-12px",style:s({color:t.property.fields.price.color})}," \uFFE5"+R(y.price),5)):f("",!0)])],2)],4))),128))],4)]),_:1},512)}}})});export{H as __tla,g as default};
