import{r as t,h as e,g as s}from"./p-3ba9c73c.js";const n=class{constructor(e){t(this,e),this.handleClick=t=>{const e=t.target;e&&this.template&&(this.value=parseInt(e.parentElement.dataset.index,10),this.el.dispatchEvent(new Event("input",{bubbles:!0})))}}render(){if(this.template)return[e("p",null,this.template.question),e("div",null,this.template.options.map((t,s)=>e("bce-button",{icon:t.text,"data-index":s,"data-checked":this.value===s,"icon-only":!0,onClick:this.handleClick,style:{color:t.color}})))]}get el(){return s(this)}static get style(){return"bce-element-icon{position:relative}bce-element-icon p{font-weight:500;text-align:center}\@media screen and (min-width:1024px){bce-element-icon p{text-align:left}}bce-element-icon>div{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-pack:center;justify-content:center}bce-element-icon bce-button{--bce-color-l:var(--bce-color-light-l);--bce-color-n:var(--bce-color-light-n);--bce-color-d:var(--bce-color-light-d);--bce-color-t:var(--bce-color-light-t);-ms-flex:0 0 auto;flex:0 0 auto;margin:8px;-webkit-transition:-webkit-transform .2s ease-in-out;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}bce-element-icon bce-button[data-checked]{-webkit-transform:scale(1.2);transform:scale(1.2)}bce-element-icon bce-button[data-checked]:focus:before{opacity:0}bce-element-icon bce-button bce-icon{font-size:22px}\@media screen and (min-width:600px){bce-element-icon bce-button bce-icon{font-size:44px}}\@media screen and (min-width:1024px){bce-element-icon>div{-ms-flex-pack:start;justify-content:flex-start}}"}};export{n as bce_element_icon};