System.register(["./p-3c39d395.system.js","./p-efe1606a.system.js","./p-bb662040.system.js"],function(e){"use strict";var t,i,s,n,r;return{setters:[function(e){t=e.r;i=e.h;s=e.g},function(e){n=e.l},function(e){r=e.E}],execute:function(){var u=e("bce_element_input_template",function(){function e(e){t(this,e);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")}e.prototype.handleInput=function(e,t){var i;var s=t.target;if(!s)return;var n=s.value;if(e==="answer"&&!n)this.hasAnswer=false;if(e==="hasAnswer"&&!n)this.answer="";if(e==="multiline"){this.hasAnswer=false;this.answer=""}t.cancelBubble=true;this[e]=n;this.value=this.updateValue((i={},i[e]=n,i));this.el.dispatchEvent(new Event("input",{bubbles:true}))};e.prototype.updateValue=function(e){if(e===void 0){e={}}var t={question:this.question,required:this.required,multiline:this.multiline,min:this.min,max:this.max,answer:this.answer,hasAnswer:this.hasAnswer};return Object.assign({},t,e)};e.prototype.componentDidLoad=function(){this.value=this.updateValue();this.el.dispatchEvent(new Event("input",{bubbles:true}))};e.prototype.render=function(){var e=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:e?"textarea":"text"},this._answer)))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:true,configurable:true});return e}())}}});