import{h as t}from"./p-cb5076d4.js";import{r as s}from"./p-0db2169b.js";import{B as i}from"./p-eebad85b.js";class e{constructor(t,s){this.label=t,this.value=s}}class h extends i{constructor(t,s,i,e,h="checkbox",r){super(t,"multiple-choice"),this.title=s,this.description=e,this.options=i,this.inputType=h,this.placeholder=r}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}}}h.type="multiple-choice",s("multiple-choice",((s,i,e,h,r,o)=>t("dvn-field-input-multiple-choice",{disabled:h,errors:e,field:s,onChange:t=>r(s,t.detail),onBlur:()=>o(s),value:i})));class r{constructor(t,s,i,e){this.label=t,this.value=s,this.tint=i,this.description=e}}class o extends i{constructor(t,s,i,e,h="radioButton",r){super(t,"single-choice"),this.title=s,this.options=i,this.inputType=h,this.description=e,this.placeholder=r}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}}o.type="single-choice",s("single-choice",((s,i,e,h,r,o)=>t("dvn-field-input-single-choice",{disabled:h,errors:e,field:s,onChange:t=>r(s,t.detail),onBlur:()=>o(s),value:i})));export{h as M,o as S,r as a,e as b}