import{a as x,W as g,o as t,c,k as u,h as a,Y as d,i as o,t as l,p as i,Z as s,u as n,C as b,j as m,H as w,bw as k,bd as S}from"./entry.49b00e51.js";import{E as B}from"./empty_news.b72a5822.js";const v={key:0,class:"before:w-[6px] mt-4 before:h-[6px] before:bg-primary before:block flex items-center before:rounded-[6px] before:mr-2.5 before:flex-none"},C={class:"line-clamp-1 flex-1 font-medium"},T={key:0,class:"text-tx-secondary ml-4"},z={class:"flex relative"},N={key:0,class:"text-tx-regular line-clamp-2 mt-4"},A={key:1,class:"mt-5 text-tx-secondary flex items-center flex-wrap"},E={key:0},H={key:1,class:"mr-5"},D={key:2,class:"flex items-center"},V=x({__name:"items",props:{index:{type:Number},id:{type:Number},title:{type:String},desc:{type:String},image:{type:String},author:{type:String},click:{type:Number},createTime:{type:String},onlyTitle:{type:Boolean,default:!0},isHorizontal:{type:Boolean,default:!1},titleLine:{type:Number,default:1},border:{type:Boolean,default:!0},source:{type:String,default:"default"},imageSize:{type:String,default:"default"},showAuthor:{type:Boolean,default:!0},showDesc:{type:Boolean,default:!0},showClick:{type:Boolean,default:!0},showTime:{type:Boolean,default:!0},showSort:{type:Boolean,default:!0}},setup(e){const f=e,h=g(()=>{switch(f.imageSize){case"default":return{width:"180px",height:"135px"};case"mini":return{width:"120px",height:"90px"};case"large":return{width:"260px",height:"195px"}}});return(r,$)=>{const y=S;return t(),c(y,{to:`/information/detail/${e.id}`},{default:u(()=>[e.onlyTitle?(t(),a("div",v,[d(r.$slots,"title",{title:e.title},()=>[o("span",C,l(e.title),1)]),e.showTime?(t(),a("span",T,l(e.createTime),1)):i("",!0)])):(t(),a("div",{key:1,class:s({"border-b border-br pb-4":e.border,"flex pt-4 items-center":!e.isHorizontal})},[o("div",z,[e.image?(t(),c(n(B),{key:0,class:s(["flex-none",{"mr-4":!e.isHorizontal}]),src:e.image,fit:"cover",style:b(n(h))},null,8,["class","src","style"])):i("",!0)]),o("div",{class:s(["flex-1",{"p-2":e.isHorizontal}])},[d(r.$slots,"title",{title:e.title},()=>[o("div",{class:s(["text-lg font-medium",`line-clamp-${e.titleLine}`])},l(e.title),3)]),e.showDesc&&e.desc?(t(),a("div",N,l(e.desc),1)):i("",!0),e.showAuthor||e.showTime||e.showClick?(t(),a("div",A,[e.showAuthor&&e.author?(t(),a("span",E,l(e.author)+"\xA0|\xA0 ",1)):i("",!0),e.showTime?(t(),a("span",H,l(e.createTime),1)):i("",!0),e.showClick?(t(),a("div",D,[m(n(w),null,{default:u(()=>[m(n(k))]),_:1}),o("span",null,"\xA0"+l(e.click)+"\u4EBA\u6D4F\u89C8",1)])):i("",!0)])):i("",!0)],2)],2))]),_:3},8,["to"])}}});export{V as _};
