import{r as registerInstance,h,H as Host}from"./index-b7735e0d.js";import{A as AttachmentSourceType}from"./attachment-32decf79.js";import"./BaseField-461b6d0c.js";var dvnFieldDisplayAttachmentCss=".sc-dvn-field-display-attachment-h{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}";var DvnFieldDisplayAttachment=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){var e=this.field;if(e.sourceType===AttachmentSourceType.RawUrl){var t=this.value;return h(Host,null,h("dvn-image",{leaned:true,bordered:true,src:t}))}var a=[];if(e.sourceType===AttachmentSourceType.AttachmentObject){a=[this.value]}else if(e.sourceType===AttachmentSourceType.AttachmentObjects){a=this.value}return h(Host,null,a.map((function(e){return h("dvn-image",{leaned:true,bordered:true,src:e.url,scale:"small"})})))};return e}();DvnFieldDisplayAttachment.style=dvnFieldDisplayAttachmentCss;export{DvnFieldDisplayAttachment as dvn_field_display_attachment};