import{r as registerInstance,h,H as Host}from"./index-55faf181.js";var dvnFieldDisplayReferenceCss=".sc-dvn-field-display-reference-h{display:-ms-flexbox;display:flex;overflow:auto}";var renderReference=function(e,r,n){var i;var t=e.imageField?r[e.imageField]:undefined;var d=e.titleField?(i=r[e.titleField])===null||i===void 0?void 0:i.split(" ").map((function(e){return e[0]})).join(""):undefined;var a=r[e.titleField];if(n.showTitle){return h("dvn-info-summary",{title:a,leaned:true},h("dvn-image",{slot:"media",bordered:true,leaned:true,src:t,text:d}))}return h("abbr",{title:a,style:{border:"none",textDecoration:"none"}},h("dvn-image",{bordered:true,src:t,text:d}))};var DvnFieldDisplayReference=function(){function e(e){registerInstance(this,e);this.meta={}}e.prototype.render=function(){var e=this,r=e.field,n=e.meta;var i=this.value||[];return h(Host,null,Array.isArray(i)?i.map((function(e){return renderReference(r,e,n)})):renderReference(r,i,n))};return e}();DvnFieldDisplayReference.style=dvnFieldDisplayReferenceCss;export{DvnFieldDisplayReference as dvn_field_display_reference};