System.register(["./p-3c39d395.system.js","./p-efe1606a.system.js","./p-bb662040.system.js"],function(t){"use strict";var e,i,s,n,r;return{setters:[function(t){e=t.r;i=t.h;s=t.g},function(t){n=t.l},function(t){r=t.E}],execute:function(){var a=t("bce_element_input_template",function(){function t(t){e(this,t);this.metadata={};this.question="";this.required=false;this.multiline=false;this.min=null;this.max=null;this.answer="";this.hasAnswer=!!this.answer;this.labelQuestion="Formulate your question";this.labelRequired="Required";this.labelMultiline="Multiline";this.labelMin="Min";this.labelMax="Max";this.labelHasAnswer="Answer";this.labelAnswer="";this.placeholderAnswer="Formulate the correct answer";this._link=n(this,this.handleInput);this._question=this._link("question");this._required=this._link("required");this._multiline=this._link("multiline");this._min=this._link("min");this._max=this._link("max");this._answer=this._link("answer");this._hasAnswer=this._link("hasAnswer")}t.prototype.handleInput=function(t,e){var i;var s=e.target;if(!s)return;var n=s.value;if(t==="answer"&&!n)this.hasAnswer=false;if(t==="hasAnswer"&&!n)this.answer="";if(t==="multiline"){this.hasAnswer=false;this.answer=""}e.cancelBubble=true;this[t]=n;this.value=this.updateValue((i={},i[t]=n,i));this.el.dispatchEvent(new Event("input",{bubbles:true}))};t.prototype.updateValue=function(t){if(t===void 0){t={}}var e={question:this.question,required:this.required,multiline:this.multiline,min:this.min,max:this.max,answer:this.answer,hasAnswer:this.hasAnswer,metadata:Object.assign({},this.metadata)};return Object.assign({},e,t)};t.prototype.componentDidLoad=function(){this.value=this.updateValue();this.el.dispatchEvent(new Event("input",{bubbles:true}))};t.prototype.render=function(){var t=this.multiline;return i(r,{question:this._question,required:this._required},i("bce-input",Object.assign({type:"switch"},this._multiline)),i("bce-input",Object.assign({type:"number"},this._min)),i("bce-input",Object.assign({type:"number"},this._max)),i("bce-input",Object.assign({type:"switch"},this._hasAnswer)),this.hasAnswer&&i("bce-input",Object.assign({type:t?"textarea":"text"},this._answer)))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:true,configurable:true});return t}())}}});