import{h as t}from"./p-ec7718e6.js";import{r as s}from"./p-2d511d0e.js";import{B as i}from"./p-d66fb38c.js";class e{constructor(t,s,i,e){this.label=t,this.value=s,this.tint=i,this.description=e}}class r extends i{constructor(t,s,i,e,r="radioButton",h){super(t,"single-choice"),this.title=s,this.options=i,this.inputType=r,this.description=e,this.placeholder=h}showPreview(){return this.preview=!0,this}getOptionOfValue(t){if(!this.optionsByValue){this.optionsByValue={};for(let t=0;t<this.options.length;t+=1)this.optionsByValue[this.options[t].value]=this.options[t]}return this.optionsByValue[t]||{label:t,value:t}}setOptions(t){return this.options=t,this}setDataProvider(t){return this.dataProvider=t,this}setDataAdapter(t){return this.dataAdapter=t,this}}r.type="single-choice",s("single-choice",((s,i,e,r,h,o)=>t("dvn-field-input-single-choice",{disabled:r,errors:e,field:s,onChange:t=>h(s,t.detail),onBlur:()=>o(s),value:i})));export{r as S,e as a}