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,a){function o(e){try{l(r.next(e))}catch(t){a(t)}}function u(e){try{l(r["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):i(e.value).then(o,u)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(t){return l([e,t])}}function l(o){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(a=o[0]&2?i["return"]:o[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;if(i=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;i=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1];a=o;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(o);break}if(a[2])n.ops.pop();n.trys.pop();continue}o=t.call(e,n)}catch(u){o=[6,u];i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-0bfb8721.system.js","./p-161b0328.system.js","./p-5a78b481.system.js","./p-ff3bc4b3.system.js","./p-160e0462.system.js"],(function(e){"use strict";var t,n,r,i;return{setters:[function(e){t=e.r;n=e.h;r=e.g},function(){},function(){},function(){},function(e){i=e.v}],execute:function(){var a=e("bce_element_icon",function(){function e(e){var n=this;t(this,e);this.handleClick=function(e){var t=e.target;if(!t||!n.template)return;n.value=parseInt(t.parentElement.dataset.index,10);var r=new Event("input",{bubbles:true,composed:true});n.el.dispatchEvent(r)}}e.prototype.validate=function(e){if(e===void 0){e=false}return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:if(!this.template||!this.template.required)return[2,[]];return[4,i.validateRule("required",[],this.value,{el:this.el,tag:this.el.tagName.toLocaleLowerCase()})];case 1:t=n.sent();this.error=t&&!e?t.message:"";return[2,t?[t]:[]]}}))}))};e.prototype.render=function(){var e=this;if(!this.template)return;return[n("p",null,this.handler.t("question")),n("div",null,this.template.options.map((function(t,r){return n("bce-button",{"data-index":r,"data-checked":e.value===r,onClick:e.handleClick},n("bce-icon",{raw:t.text,style:{color:t.color}}))}))),this.error&&n("small",null,this.error)]};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;margin:20px 0}:host p{font-weight:500;text-align:center}\@media screen and (min-width: 1024px){:host p{text-align:left}}:host>div{display:-ms-flexbox;display:flex;-ms-flex-flow:column wrap;flex-flow:column wrap;-ms-flex-pack:center;justify-content:center}:host bce-button{--bce-c300:var(--bce-c300-light);--bce-c400:var(--bce-c400-light);--bce-c500:var(--bce-c500-light);--bce-c600:var(--bce-c600-light);--bce-c700:var(--bce-c700-light);--bce-con1:var(--bce-con1-light);--bce-con2:var(--bce-con2-light);--bce-con3:var(--bce-con3-light);--bce-con4:var(--bce-con4-light);-ms-flex:0 0 auto;flex:0 0 auto;margin:8px;-webkit-transition:-webkit-transform 0.2s ease-in-out;transition:-webkit-transform 0.2s ease-in-out;transition:transform 0.2s ease-in-out;transition:transform 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out;height:68px}:host bce-button[data-checked]{-webkit-transform:scale(1.2);transform:scale(1.2)}:host bce-button bce-icon{display:-ms-flexbox;display:flex;width:100%;font-size:44px;-ms-flex-pack:center;justify-content:center}:host>small{position:absolute;font-size:12px;bottom:-16px;left:12px;text-align:left;-webkit-transition:left 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:left 0.15s cubic-bezier(0.4, 0, 0.2, 1);color:var(--bce-c500-error)}:host>small:before{content:\"\";position:absolute;left:-6px;font-weight:100}\@media screen and (min-width: 600px){:host>div{-ms-flex-flow:row wrap;flex-flow:row wrap}}\@media screen and (min-width: 1024px){:host>div{-ms-flex-pack:start;justify-content:flex-start}}"},enumerable:true,configurable:true});return e}())}}}));