import{_ as u}from"./WebContentItem-DFVYreAc.mjs";import{_ as c,W as h,bh as o,o as s,c as l,a as y,F as f,r as p,v as m,d as g,n as S}from"./entry.DPwc-EV0.js";import"./WebImage-BBQZzdK6.mjs";import"./useImageUrl-1XbeiwSF.mjs";const v={props:{data:{type:Object,default(){return{items:[]}}},imagePosition:{type:String,default:"above"},imageShaping:{type:String,default:"crop"},rowLayout:{type:String},numberOfColumns:{type:Number,default:1},showSummary:{type:Boolean,default:!0},hidePrimarySection:{type:Boolean},hidePublishedDate:{type:Boolean,default:!1},hideCompanyDate:{type:Boolean,default:!1},smallerTitleFontSize:{type:Boolean,default:!1},showDate:{type:Boolean,default:!0},displayFullHeadlines:{type:Boolean,default:!1},breadcrumbTextTransform:{type:String},nativeAdSlotIndex:{type:[String,Number],default:0},nativeType:{type:String,default:"list"},itemMask:{type:Boolean,default:!1},pageCompanyName:{type:String,default:""},titleColor:{type:String},injectNativeAd:{type:Boolean,default:!1},showUpcomingIndicator:{type:Boolean,default:!1},loadFirstImageNonLazy:{type:Boolean,default:!1}},emits:["item-click"],data(){return{id:h()}},computed:{cssVars(){let e="";for(let a=0;a =4?"1fr 1fr 1fr 1fr":e,"--three-columns":this.numCols>=3?"1fr 1fr 1fr":e,"--two-columns":this.numCols>=2?"1fr 1fr":e}},imageSide(){return!(this.imagePosition==="above"||this.imagePosition==="behind"||this.imagePosition==="none")},numCols(){return this.numberOfColumns??1},itemsWithAd(){var a,t;const e=[...(a=this==null?void 0:this.data)==null?void 0:a.items];return!this.nativeAdSlotIndex||this.nativeAdSlotIndex<1||!((t=this.nativeAd)!=null&&t.nativeTitle)?e:this.injectNativeAd?(e.splice(this.nativeAdSlotIndex-1,0,this.nativeAd),e):(e[this.nativeAdSlotIndex-1]=this.nativeAd,e)},nativeAd(){return this.nativeType==="list"?o().value.listItems[this.id]:o().value.body}},created(){this.nativeType==="list"&&this.nativeAdSlotIndex>0&&o.registerContentList(this.id)},methods:{checkPageCompanyName(e){var a;return((a=e.company)==null?void 0:a.name)!==this.pageCompanyName}}},_={ref:"content_list",class:"items-wrapper"},C=["onClick"];function b(e,a,t,A,w,i){const d=u;return s(),l("div",{class:m(["content-list",[t.imagePosition,i.numCols>1?"grid":""]]),style:S(i.cssVars)},[y("div",_,[(s(!0),l(f,null,p(i.itemsWithAd,(n,r)=>(s(),l("div",{key:n.id,class:m(["item",e.$ss.contentStyle.itemVerticalSpacing?e.$ss.contentStyle.itemVerticalSpacing:"small"]),onClick:()=>{e.$emit("item-click",n)}},[g(d,{class:"content-item",item:n,"title-font-size":16,"title-color":t.titleColor,"show-summary":t.showSummary,"show-upcoming-indicator":t.showUpcomingIndicator,"hide-primary-section":t.hidePrimarySection,"hide-published-date":t.hidePublishedDate,"hide-company-date":t.hideCompanyDate,"show-date":t.showDate,"display-full-headline":t.displayFullHeadlines,"image-position":t.imagePosition,"image-shaping":t.imageShaping,"page-company-name":t.pageCompanyName,"item-mask":t.itemMask,"lazy-load-image":!t.loadFirstImageNonLazy||r>0},null,8,["item","title-color","show-summary","show-upcoming-indicator","hide-primary-section","hide-published-date","hide-company-date","show-date","display-full-headline","image-position","image-shaping","page-company-name","item-mask","lazy-load-image"])],10,C))),128))],512)],6)}const P=c(v,[["render",b],["__scopeId","data-v-ec52f1b8"]]);export{P as default};