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