import{r as registerInstance,h,H as Host}from"./index-102043e0.js";import{h as hasLink,l as linkify}from"./utils-c4a3ab3b.js";var dvnFieldDisplayCellTextCss=".sc-dvn-field-display-cell-text-h{display:block;padding:6px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}";var DvnFieldDisplayCellText=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){var e=this.field;var t=this.value;if(!t){return h(Host,null)}if(e.inputType==="url"){t=h("a",{href:t.startsWith("http")?t:"http://"+t,target:"_blank"},t)}else if(hasLink(this.value)){return h(Host,{innerHTML:linkify(t)})}if(e.format==="markdown"){return h(Host,null,h("dvn-markdown",{content:t}))}return h(Host,null,t)};return e}();DvnFieldDisplayCellText.style=dvnFieldDisplayCellTextCss;export{DvnFieldDisplayCellText as dvn_field_display_cell_text};