System.register(["./p-e07174c9.system.js","./p-8ed8af5a.system.js"],(function(e){"use strict";var t,n,s;return{setters:[function(e){t=e.r;n=e.h},function(e){s=e.E}],execute:function(){var i=e("bce_element_input_editor",function(){function e(e){var n=this;t(this,e);this.label={name:"Input",labelQuestion:"Formulate your question",labelRequired:"Required",labelMultiline:"Multiline",labelMin:"Min",labelMax:"Max",labelHasAnswer:"Answer",labelAnswer:"",placeholderAnswer:"Formulate the correct answer"};this.onAnswer=function(e){if(!e)n.handler.set("hasAnswer",false)};this.onHasAnswer=function(e){if(!e)n.handler.set("answer","",{localize:true})};this.onMultiline=function(e){n.handler.set("hasAnswer",false);n.handler.set("answer","",{localize:true})}}e.prototype.prop=function(e,t){if(t===void 0){t={}}return this.handler.prop(e,Object.assign(Object.assign({},t),{label:this.label}))};e.prototype.render=function(){var e=this.value,t=e.hasAnswer,i=e.multiline;return n(s,{question:this.prop("question",{localize:true}),required:this.prop("required")},n("bce-switch",Object.assign({},this.prop("multiline",{on:this.onMultiline}))),n("bce-input",Object.assign({},this.prop("min"),{type:"number"})),n("bce-input",Object.assign({},this.prop("max"),{type:"number"})),n("bce-switch",Object.assign({},this.prop("hasAnswer",{on:this.onHasAnswer}))),t&&n("bce-input",Object.assign({},this.prop("answer",{on:this.onAnswer,localize:true}),{type:i?"textarea":"text",validation:"required"})),n("slot",null))};return e}())}}}));