import{r as registerInstance,h,H as Host}from"./index-55faf181.js";import{N as NestedField}from"./nested-395a4cd4.js";import"./BaseField-461b6d0c.js";var dvnFieldDisplayCss=".sc-dvn-field-display-h{font-size:0.9em;margin:0px 0px calc(4 * var(--spacing-unit)) 0px;display:block}.sc-dvn-field-display-h:last-child{margin-bottom:0}.title.sc-dvn-field-display{font-size:0.8em;margin-bottom:calc(2 * var(--spacing-unit));color:var(--color-text-secondary)}";var fieldTagMap={number:"dvn-field-display-number","multiple-choice":"dvn-field-display-multiple-choice","single-choice":"dvn-field-display-single-choice",text:"dvn-field-display-text",date:"dvn-field-display-date",attachment:"dvn-field-display-attachment",rawData:"dvn-field-display-raw-data",range:"dvn-field-display-range",reference:"dvn-field-display-reference"};var DvnFieldDisplay=function(){function e(e){registerInstance(this,e);this.showTitle=true}e.prototype.render=function(){var e=this,i=e.field,a=e.infoTitle,l=e.meta,d=e.showTitle,t=e.value;var s=i;var n=fieldTagMap[i.type];if(i.type===NestedField.type){n=fieldTagMap[i.nestedField.type];s=i.nestedField}return h(Host,null,d&&h("div",{class:"title"},(a||"").toUpperCase()),n?h(n,{field:s,value:t,meta:l,fixHeight:false}):h("span",null,t))};return e}();DvnFieldDisplay.style=dvnFieldDisplayCss;export{DvnFieldDisplay as dvn_field_display};