var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function u(e){try{c(r.next(e))}catch(t){o(t)}}function a(e){try{c(r["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):i(e.value).then(u,a)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(e){return function(t){return c([e,t])}}function c(u){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;i=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1];o=u;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(u);break}if(o[2])n.ops.pop();n.trys.pop();continue}u=t.call(e,n)}catch(a){u=[6,a];i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-0bfb8721.system.js"],(function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.r;n=e.h;r=e.g}],execute:function(){var i=e("bce_element_form",function(){function e(e){t(this,e)}e.prototype.validate=function(e){if(e===void 0){e=false}return __awaiter(this,void 0,void 0,(function(){var t,n,r,i;return __generator(this,(function(o){switch(o.label){case 0:t=this.el.shadowRoot;n=t.querySelectorAll("bce-input");r=Array.from(n);return[4,Promise.all(r.map((function(t){return t.validate(e)})))];case 1:i=o.sent();return[2,[].concat.apply([],i)]}}))}))};e.prototype.isSelect=function(e){return e.type==="radio"};e.prototype.renderInput=function(e){return n("bce-input",{id:e.id,key:e.id,label:e.label,type:e.type,validation:e.required?"required":undefined})};e.prototype.renderSelect=function(e){return n("bce-select",{id:e.id,key:e.id,label:e.label,type:e.type,validation:e.required?"required":undefined},(e.options||[]).map((function(e,t){return n("bce-option",{key:t,value:e},e)})))};e.prototype.render=function(){var e=this;return this.template.input.map((function(t){return e.isSelect(t)?e.renderSelect(t):e.renderInput(t)}))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:true,configurable:true});Object.defineProperty(e,"style",{get:function(){return":host{position:relative;display:block}"},enumerable:true,configurable:true});return e}())}}}));