import{h as t}from"./p-9f21f85f.js";import{r as i}from"./p-31e77e7b.js";import{B as s}from"./p-105f7627.js";class e{constructor(t,i){this.label=t,this.value=i}}class h extends s{constructor(t,i,s,e,h="checkbox",r){super(t,"multiple-choice"),this.title=i,this.description=e,this.options=s,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",i("multiple-choice",((i,s,e,h,r,o)=>t("dvn-field-input-multiple-choice",{disabled:h,errors:e,field:i,onChange:t=>r(i,t.detail),onBlur:()=>o(i),value:s})));export{h as M,e as a}