System.register(["./p-3c39d395.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 u=e("bce_element_matrix",function(){function e(e){var n=this;t(this,e);this.value=this.template?Array(this.template.rows.length).fill(null):[];this.handleInput=function(e){e.cancelBubble=true;var t=e.target;if(!t.value)return;var r=n.value.slice();var u=t.value.split(","),l=u[0],i=u[1];var a=parseInt(l,10);var s=i===undefined?null:parseInt(i,10);r[a]=s;n.value=n.template.rows.map(function(e,t){return r[t]===undefined?null:r[t]});console.log(n.value);n.el.dispatchEvent(new Event("input",{bubbles:true}))}}e.prototype.renderRow=function(e){if(!this.template)return null;var t=this.value[e]!=null?e+","+this.value[e]:null;return n("bce-input",{type:"radio",value:t,validation:this.template.required?"required":"",onInput:this.handleInput},this.template.columns.map(function(t,r){return n("bce-option",{value:e+","+r})}))};e.prototype.render=function(){var e=this;if(!this.template)return null;var t=this.template.columns.map(function(e){return n("label",null,e.text)});var r=this.template.rows.map(function(e){return n("label",null,e.text)});var u=this.template.rows.map(function(t,n){return e.renderRow(n)});return[n("p",null,this.template.question),n("div",{class:"tl"},t),n("div",{class:"sl"},r),n("div",{class:"rb"},u)]};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:true,configurable:true});Object.defineProperty(e,"style",{get:function(){return"bce-element-matrix{display:grid;grid-template:\"q q\" \".. tl\" auto \"sl rb\" auto/auto auto}bce-element-matrix>p{font-weight:500;grid-area:q;text-align:center}\@media screen and (min-width:1024px){bce-element-matrix>p{text-align:left}}bce-element-matrix>div.tl{position:relative;grid-area:tl;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}bce-element-matrix>div.sl{position:relative;height:100%;grid-area:sl;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}bce-element-matrix>div.sl label{line-height:28px;margin:20px 0 0;height:32px}bce-element-matrix>div.rb{grid-area:rb}bce-element-matrix>div.rb bce-input>[data-input]{position:relative;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}"},enumerable:true,configurable:true});return e}())}}});