import{r as e,c as d,h as i}from"./p-9f21f85f.js";const o=class{constructor(i){e(this,i),this.change=d(this,"change",7)}render(){const{disabled:e,errors:d,field:o,value:r}=this,{options:t=[],preview:a}=o,n=d&&d.length>0,s=n?d[0]:void 0;if(a){const e=t.find((e=>e.value===r));return i("div",null,e?e.label:"",i("div",null,s))}return"select"===o.inputType?i("dvn-select",{dataAdapter:o.dataAdapter,dataProvider:o.dataProvider,disabled:e||o.disabled,feedback:n?"error":void 0,leaned:!0,value:r,width:"100%"},o.placeholder&&i("dvn-select-option",null,o.placeholder),t.map((e=>i("dvn-select-option",{value:e.value},e.label)))):"radioCard"===o.inputType?i("dvn-radio-card-group",{options:t,value:r}):i("dvn-radio-group",{disabled:e||o.disabled,leaned:!0,options:t,value:r})}};export{o as dvn_field_input_single_choice}