var __extends=this&&this.__extends||function(){var t=function(e,i){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[i]=e[i]};return t(e,i)};return function(e,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function o(){this.constructor=e}e.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)}}();import{h}from"./index-55faf181.js";import{r as registerField}from"./index-403e215e.js";import{B as BaseField}from"./BaseField-461b6d0c.js";var MultipleChoiceFieldOption=function(){function t(t,e){this.label=t;this.value=e}return t}();var MultipleChoiceField=function(t){__extends(e,t);function e(e,i,o,n,r,l){if(r===void 0){r="checkbox"}var s=t.call(this,e,"multiple-choice")||this;s.title=i;s.description=n;s.options=o;s.inputType=r;s.placeholder=l;return s}e.prototype.showPreview=function(){this.preview=true;return this};e.prototype.getOptionOfValue=function(t){if(!this.optionsByValue){this.optionsByValue={};for(var e=0;e<this.options.length;e+=1){this.optionsByValue[this.options[e].value]=this.options[e]}}return this.optionsByValue[t]||{label:t,value:t}};return e}(BaseField);MultipleChoiceField.type="multiple-choice";var render$1=function(t,e,i,o,n,r){return h("dvn-field-input-multiple-choice",{disabled:o,errors:i,field:t,onChange:function(e){return n(t,e.detail)},onBlur:function(){return r(t)},value:e})};registerField("multiple-choice",render$1);var SingleChoiceFieldOption=function(){function t(t,e,i,o){this.label=t;this.value=e;this.tint=i;this.description=o}return t}();var SingleChoiceField=function(t){__extends(e,t);function e(e,i,o,n,r,l){if(r===void 0){r="radioButton"}var s=t.call(this,e,"single-choice")||this;s.title=i;s.options=o;s.inputType=r;s.description=n;s.placeholder=l;return s}e.prototype.showPreview=function(){this.preview=true;return this};e.prototype.getOptionOfValue=function(t){if(!this.optionsByValue){this.optionsByValue={};for(var e=0;e<this.options.length;e+=1){this.optionsByValue[this.options[e].value]=this.options[e]}}return this.optionsByValue[t]||{label:t,value:t}};e.prototype.setOptions=function(t){this.options=t;return this};e.prototype.setDataProvider=function(t){this.dataProvider=t;return this};e.prototype.setDataAdapter=function(t){this.dataAdapter=t;return this};return e}(BaseField);SingleChoiceField.type="single-choice";var render=function(t,e,i,o,n,r){return h("dvn-field-input-single-choice",{disabled:o,errors:i,field:t,onChange:function(e){return n(t,e.detail)},onBlur:function(){return r(t)},value:e})};registerField("single-choice",render);export{MultipleChoiceField as M,SingleChoiceField as S,SingleChoiceFieldOption as a,MultipleChoiceFieldOption as b};